Skip to content

Commit

Permalink
Revert "Revert "update alpine & php""
Browse files Browse the repository at this point in the history
  • Loading branch information
ctizen committed Sep 22, 2024
1 parent f27a8bc commit d014a6a
Show file tree
Hide file tree
Showing 9 changed files with 62 additions and 65 deletions.
109 changes: 53 additions & 56 deletions Common/Backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM alpine:3.19.2
FROM alpine:3.20.3

RUN apk update && \
apk upgrade && \
Expand All @@ -18,35 +18,35 @@ RUN apk update && \
nginx \
munin \
munin-node \
postgresql13 \
php81-fpm \
php81-bcmath \
php81-ctype \
php81-curl \
php81-gettext \
php81-gd \
php81-gettext \
php81-gmp \
php81-iconv \
php81-intl \
php81-json \
php81-mbstring \
php81-openssl \
php81-pdo_pgsql \
php81-pdo \
php81-pecl-ast \
php81-pecl-protobuf \
php81-pecl-memcached \
php81-pgsql \
php81-phar \
php81-phpdbg \
php81-simplexml \
php81-soap \
php81-tokenizer \
php81-xdebug \
php81-xml \
php81-xmlwriter \
php81-xmlreader \
postgresql16 \
php83-fpm \
php83-bcmath \
php83-ctype \
php83-curl \
php83-gettext \
php83-gd \
php83-gettext \
php83-gmp \
php83-iconv \
php83-intl \
php83-json \
php83-mbstring \
php83-openssl \
php83-pdo_pgsql \
php83-pdo \
php83-pecl-ast \
php83-pecl-protobuf \
php83-pecl-memcached \
php83-pgsql \
php83-phar \
php83-phpdbg \
php83-simplexml \
php83-soap \
php83-tokenizer \
php83-xdebug \
php83-xml \
php83-xmlwriter \
php83-xmlreader \
postfix \
opendkim \
net-tools \
Expand Down Expand Up @@ -78,32 +78,29 @@ RUN cp /usr/share/zoneinfo/${TIMEZONE} /etc/localtime && \
RUN touch $PHP_LOGFILE
RUN chown nobody $PHP_LOGFILE

RUN ln -s /usr/bin/php81 /usr/bin/php
RUN ln -s /usr/bin/php-fpm81 /usr/bin/php-fpm

# Set environments
RUN sed -i "s|;*daemonize\s*=\s*yes|daemonize = no|g" /etc/php81/php-fpm.d/www.conf && \
sed -i "s|;*clear_env\s*=\s*no|clear_env = no|g" /etc/php81/php-fpm.d/www.conf && \
sed -i "s|;*pm\.max_children\s*=\s*.*|pm.max_children = 20|g" /etc/php81/php-fpm.d/www.conf && \
sed -i "s|;*pm\.start_servers\s*=\s*.*|pm.start_servers = 10|g" /etc/php81/php-fpm.d/www.conf && \
sed -i "s|;*pm\.min_spare_servers\s*=\s*.*|pm.min_spare_servers = 5|g" /etc/php81/php-fpm.d/www.conf && \
sed -i "s|;*pm\.max_spare_servers\s*=\s*.*|pm.max_spare_servers = 10|g" /etc/php81/php-fpm.d/www.conf && \
sed -i "s|;*listen\s*=\s*localhost:9000|listen = 9000|g" /etc/php81/php-fpm.d/www.conf && \
sed -i "s|;*listen\s*=\s*/||g" /etc/php81/php-fpm.d/www.conf && \
sed -i "s|;*date.timezone =.*|date.timezone = ${TIMEZONE}|i" /etc/php81/php.ini && \
sed -i "s|;*memory_limit =.*|memory_limit = ${PHP_MEMORY_LIMIT}|i" /etc/php81/php.ini && \
sed -i "s|;*error_log =.*|error_log = ${PHP_LOGFILE}|i" /etc/php81/php.ini && \
sed -i "s|;*upload_max_filesize =.*|upload_max_filesize = ${MAX_UPLOAD}|i" /etc/php81/php.ini && \
sed -i "s|;*max_file_uploads =.*|max_file_uploads = ${PHP_MAX_FILE_UPLOAD}|i" /etc/php81/php.ini && \
sed -i "s|;*max_execution_time =.*|max_execution_time = 1000|i" /etc/php81/php.ini && \
sed -i "s|;*post_max_size =.*|post_max_size = ${PHP_MAX_POST}|i" /etc/php81/php.ini && \
sed -i "s|;*cgi.fix_pathinfo=.*|cgi.fix_pathinfo = 0|i" /etc/php81/php.ini && \
sed -i "s|;*opcache.enable=.*|opcache.enable = 1|i" /etc/php81/php.ini && \
sed -i "s|;*opcache.enable_cli=.*|opcache.enable_cli = 1|i" /etc/php81/php.ini && \
sed -i "s|;*opcache.memory_consumption=.*|opcache.memory_consumption = 128|i" /etc/php81/php.ini && \
sed -i "s|;*opcache.interned_strings_buffer=.*|opcache.interned_strings_buffer=8|i" /etc/php81/php.ini && \
sed -i "s|;*opcache.max_accelerated_files=.*|opcache.max_accelerated_files=4000|i" /etc/php81/php.ini && \
sed -i "s|;*opcache.fast_shutdown=.*|opcache.fast_shutdown=1|i" /etc/php81/php.ini
RUN sed -i "s|;*daemonize\s*=\s*yes|daemonize = no|g" /etc/php83/php-fpm.d/www.conf && \
sed -i "s|;*clear_env\s*=\s*no|clear_env = no|g" /etc/php83/php-fpm.d/www.conf && \
sed -i "s|;*pm\.max_children\s*=\s*.*|pm.max_children = 20|g" /etc/php83/php-fpm.d/www.conf && \
sed -i "s|;*pm\.start_servers\s*=\s*.*|pm.start_servers = 10|g" /etc/php83/php-fpm.d/www.conf && \
sed -i "s|;*pm\.min_spare_servers\s*=\s*.*|pm.min_spare_servers = 5|g" /etc/php83/php-fpm.d/www.conf && \
sed -i "s|;*pm\.max_spare_servers\s*=\s*.*|pm.max_spare_servers = 10|g" /etc/php83/php-fpm.d/www.conf && \
sed -i "s|;*listen\s*=\s*localhost:9000|listen = 9000|g" /etc/php83/php-fpm.d/www.conf && \
sed -i "s|;*listen\s*=\s*/||g" /etc/php83/php-fpm.d/www.conf && \
sed -i "s|;*date.timezone =.*|date.timezone = ${TIMEZONE}|i" /etc/php83/php.ini && \
sed -i "s|;*memory_limit =.*|memory_limit = ${PHP_MEMORY_LIMIT}|i" /etc/php83/php.ini && \
sed -i "s|;*error_log =.*|error_log = ${PHP_LOGFILE}|i" /etc/php83/php.ini && \
sed -i "s|;*upload_max_filesize =.*|upload_max_filesize = ${MAX_UPLOAD}|i" /etc/php83/php.ini && \
sed -i "s|;*max_file_uploads =.*|max_file_uploads = ${PHP_MAX_FILE_UPLOAD}|i" /etc/php83/php.ini && \
sed -i "s|;*max_execution_time =.*|max_execution_time = 1000|i" /etc/php83/php.ini && \
sed -i "s|;*post_max_size =.*|post_max_size = ${PHP_MAX_POST}|i" /etc/php83/php.ini && \
sed -i "s|;*cgi.fix_pathinfo=.*|cgi.fix_pathinfo = 0|i" /etc/php83/php.ini && \
sed -i "s|;*opcache.enable=.*|opcache.enable = 1|i" /etc/php83/php.ini && \
sed -i "s|;*opcache.enable_cli=.*|opcache.enable_cli = 1|i" /etc/php83/php.ini && \
sed -i "s|;*opcache.memory_consumption=.*|opcache.memory_consumption = 128|i" /etc/php83/php.ini && \
sed -i "s|;*opcache.interned_strings_buffer=.*|opcache.interned_strings_buffer=8|i" /etc/php83/php.ini && \
sed -i "s|;*opcache.max_accelerated_files=.*|opcache.max_accelerated_files=4000|i" /etc/php83/php.ini && \
sed -i "s|;*opcache.fast_shutdown=.*|opcache.fast_shutdown=1|i" /etc/php83/php.ini

# Cleaning up
RUN mkdir /www && \
Expand All @@ -112,7 +109,7 @@ RUN mkdir /www && \

RUN ln -sf /dev/stdout /var/log/nginx/access.log \
&& ln -sf /dev/stderr /var/log/nginx/error.log \
&& ln -sf /dev/stderr /var/log/php81/error.log
&& ln -sf /dev/stderr /var/log/php83/error.log

# ------------ Local user init (for make & build tasks) --------
# Create user (workaround against too big uids)
Expand Down
2 changes: 1 addition & 1 deletion Common/Frontend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM alpine:3.19.2
FROM alpine:3.20.3

ENV TIMEZONE Europe/Berlin
ENV PHP_MEMORY_LIMIT 512M
Expand Down
2 changes: 1 addition & 1 deletion Frey/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ enable_debug:
@echo -ne "zend_extension=xdebug.so\n \
xdebug.mode=debug\n \
xdebug.client_host=172.17.0.1\n \
xdebug.client_port=9001\n" > /etc/php81/conf.d/50_xdebug.ini
xdebug.client_port=9001\n" > /etc/php83/conf.d/50_xdebug.ini
$(shell kill -SIGUSR2 `ps ax| grep php-fpm | grep master | awk '{print $$1}'`)

.PHONY: docker_enable_debug
Expand Down
2 changes: 1 addition & 1 deletion Gullveig/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM ghcr.io/mahjongpantheon/pantheon-backend-common:latest

ENV PHP_IDE_CONFIG serverName=pantheon_gullveig
ENV MAX_UPLOAD 1M
RUN sed -i "s|;*upload_max_filesize =.*|upload_max_filesize = ${MAX_UPLOAD}|i" /etc/php81/php.ini
RUN sed -i "s|;*upload_max_filesize =.*|upload_max_filesize = ${MAX_UPLOAD}|i" /etc/php83/php.ini

RUN echo "host_name gullveig" >> /etc/munin/munin-node.conf

Expand Down
2 changes: 1 addition & 1 deletion Gullveig/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ enable_debug:
@echo -ne "zend_extension=xdebug.so\n \
xdebug.mode=debug\n \
xdebug.client_host=172.17.0.1\n \
xdebug.client_port=9001\n" > /etc/php81/conf.d/50_xdebug.ini
xdebug.client_port=9001\n" > /etc/php83/conf.d/50_xdebug.ini
$(shell kill -SIGUSR2 `ps ax| grep php-fpm | grep master | awk '{print $$1}'`)

.PHONY: docker_enable_debug
Expand Down
2 changes: 1 addition & 1 deletion Hermod/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ docker_last_mail: get_docker_id
@if [ "$(RUNNING_DOCKER_ID)" = "" ]; then \
echo "${RED}Hermod container is not running, can't run seeding.${NC}"; \
else \
docker exec -t $(RUNNING_DOCKER_ID) sh -c 'php81 /var/www/html/Hermod/prettify_email.php'; \
docker exec -t $(RUNNING_DOCKER_ID) sh -c 'php83 /var/www/html/Hermod/prettify_email.php'; \
fi
4 changes: 2 additions & 2 deletions Hermod/configs/supervisord.conf
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ directory = /etc/nginx
startsecs = 0

[program:php]
command = php-fpm81 -R -F
command = php-fpm83 -R -F
autostart = true
autorestart = true
directory = /etc/php81
directory = /etc/php83
startsecs = 0

[program:munin]
Expand Down
2 changes: 1 addition & 1 deletion Hugin/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ enable_debug:
@echo -ne "zend_extension=xdebug.so\n \
xdebug.mode=debug\n \
xdebug.client_host=172.17.0.1\n \
xdebug.client_port=9001\n" > /etc/php81/conf.d/50_xdebug.ini
xdebug.client_port=9001\n" > /etc/php83/conf.d/50_xdebug.ini
$(shell kill -SIGUSR2 `ps ax| grep php-fpm | grep master | awk '{print $$1}'`)

.PHONY: docker_enable_debug
Expand Down
2 changes: 1 addition & 1 deletion Mimir/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ enable_debug:
@echo -ne "zend_extension=xdebug.so\n \
xdebug.mode=debug\n \
xdebug.client_host=172.17.0.1\n \
xdebug.client_port=9001\n" > /etc/php81/conf.d/50_xdebug.ini
xdebug.client_port=9001\n" > /etc/php83/conf.d/50_xdebug.ini
$(shell kill -SIGUSR2 `ps ax | grep php-fpm | grep master | awk '{print $$1}'`)

.PHONY: docker_enable_debug
Expand Down

0 comments on commit d014a6a

Please sign in to comment.