Skip to content

Commit

Permalink
Update opcache settings
Browse files Browse the repository at this point in the history
  • Loading branch information
jtrouth committed Dec 30, 2023
1 parent d70fa03 commit 8ecd8fb
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@
# https://hub.docker.com/_/php
FROM php:8.2-apache

# Configure PHP for Cloud Run.
# Configure PHP for GKE.
# Precompile PHP code with opcache.
RUN docker-php-ext-install -j "$(nproc)" opcache
# RUN docker-php-ext-install -j "$(nproc)" memcache
RUN set -ex; \
{ \
# echo "memory_limit = 256M"; \
Expand All @@ -14,9 +13,11 @@ RUN set -ex; \
# echo "post_max_size = 32M"; \
echo "; Configure Opcache for Containers"; \
echo "opcache.enable = On"; \
echo "opcache.validate_timestamps = Off"; \
echo "opcache.enable_cli = On"; \
echo "opcache.validate_timestamps = On"; \
echo "opcache.revalidate_freq = 60"; \
echo "; Configure Opcache Memory (Application-specific)"; \
echo "opcache.memory_consumption = 128"; \
echo "opcache.memory_consumption = 256"; \
} > "$PHP_INI_DIR/conf.d/app-engine.ini"


Expand Down

0 comments on commit 8ecd8fb

Please sign in to comment.