From fc8506ec509336a2ba38c74ba696011970d03e89 Mon Sep 17 00:00:00 2001 From: skjnldsv Date: Thu, 22 Aug 2024 09:55:04 +0200 Subject: [PATCH] fix(shallow-server): enable apc.cli Signed-off-by: skjnldsv --- shallow-server/Dockerfile | 3 ++- shallow-server/apc-cli-enable.ini | 1 + shallow-server/initnc.sh | 11 +++++++++++ 3 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 shallow-server/apc-cli-enable.ini diff --git a/shallow-server/Dockerfile b/shallow-server/Dockerfile index de99c410..4e585f35 100644 --- a/shallow-server/Dockerfile +++ b/shallow-server/Dockerfile @@ -17,7 +17,8 @@ RUN apt-get update && \ apt-get autoremove -y && apt-get autoclean && apt-get clean && \ rm -rf /tmp/* /var/tmp/* /var/lib/apt/lists/* -COPY opcache-recommended.ini /usr/local/etc/php/conf.d/ +COPY opcache-recommended.ini /etc/php/8.1/cli/conf.d/99-opcache-recommended.ini +COPY apc-cli-enable.ini /etc/php/8.1/cli/conf.d/99-apc-cli-enable.ini WORKDIR /var/www/html diff --git a/shallow-server/apc-cli-enable.ini b/shallow-server/apc-cli-enable.ini new file mode 100644 index 00000000..008bcabf --- /dev/null +++ b/shallow-server/apc-cli-enable.ini @@ -0,0 +1 @@ +apc.enable_cli=1 diff --git a/shallow-server/initnc.sh b/shallow-server/initnc.sh index 5a3ab39a..860c776e 100755 --- a/shallow-server/initnc.sh +++ b/shallow-server/initnc.sh @@ -47,3 +47,14 @@ else php occ config:system:set --type string --value '\\OC\\Memcache\\Redis' memcache.distributed " fi + +if test -z "$APCU" +then + echo "\$APCU not set, ignoring..." +else + su www-data -c " + php occ config:system:set memcache.local --value '\OC\Memcache\APCu' + php occ config:system:set memcache.distributed --value '\OC\Memcache\APCu' + php occ config:system:set hashing_default_password --value true --type boolean + " +fi