Polished
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
# LEMP Linux NGINX MariaDB PHP
|
||||
|
||||
services:
|
||||
php-fpm:
|
||||
multi-php-fpm:
|
||||
restart: unless-stopped
|
||||
image: eroncero/php-fpm-srv:latest
|
||||
image: eroncero/multi-php-fpm:latest
|
||||
volumes:
|
||||
#- ./etc/php/8.2/fpm/pool.d:/etc/php/8.2/fpm/pool.d
|
||||
- php-fpm_pool.d:/etc/php/8.2/fpm/pool.d
|
||||
- php-fpm_ipc_socketfile:/run/php/
|
||||
- multi-php-fpm_pool.d:/etc/php/8.2/fpm/pool.d
|
||||
- multi-php-fpm_ipc_socketfile:/run/php/
|
||||
|
||||
nginx:
|
||||
restart: unless-stopped
|
||||
@@ -34,10 +34,10 @@ services:
|
||||
- mysql_ipc_socketfile:/run/mysqld/mysqld.sock
|
||||
|
||||
volumes:
|
||||
php-fpm_pool.d:
|
||||
multi-php-fpm_pool.d:
|
||||
nginx_sites-available:
|
||||
mysql_ipc_socketfile:
|
||||
php_ipc_socketfile:
|
||||
multi-php-fpm_ipc_socketfile:
|
||||
nginx_logs:
|
||||
nginx_www:
|
||||
nginx_sites-available:
|
9
multi-php-fpm/project/entrypoint/entrypoint.sh
Normal file
9
multi-php-fpm/project/entrypoint/entrypoint.sh
Normal file
@@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
|
||||
/bin/sh /entrypoint/install-php-versions.sh
|
||||
|
||||
# Run the CMD that was passed (or default)
|
||||
#exec "$@"
|
||||
|
||||
tail -f /dev/null
|
||||
|
@@ -44,3 +44,5 @@ for version in $PHP_VERSIONS; do
|
||||
done
|
||||
|
||||
update-alternatives --set php /usr/bin/php$DEF_PHP_INTERPRETER
|
||||
|
||||
/bin/sh /entrypoint/start-php-fpm.sh
|
21
multi-php-fpm/project/entrypoint/start-php-fpm.sh
Normal file
21
multi-php-fpm/project/entrypoint/start-php-fpm.sh
Normal file
@@ -0,0 +1,21 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Start each version listed in PHP_VERSIONS
|
||||
for version in $PHP_VERSIONS; do
|
||||
echo "Starting php$version-fpm..."
|
||||
service "php$version-fpm" start
|
||||
done
|
||||
|
||||
# Check if BUILDTIME_PHP_VER_INST is defined and not already in PHP_VERSIONS
|
||||
if [ -n "$BUILDTIME_PHP_VER_INST" ]; then
|
||||
case " $PHP_VERSIONS " in
|
||||
*" $BUILDTIME_PHP_VER_INST "*)
|
||||
echo "BUILDTIME_PHP_VER_INST ($BUILDTIME_PHP_VER_INST) already started."
|
||||
;;
|
||||
*)
|
||||
echo "Starting BUILDTIME_PHP_VER_INST (php$BUILDTIME_PHP_VER_INST-fpm)..."
|
||||
service "php$BUILDTIME_PHP_VER_INST-fpm" start
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
@@ -1,3 +1,10 @@
|
||||
FROM debian:bookworm
|
||||
|
||||
RUN apt-get update; apt-get full-upgrade -y
|
||||
RUN apt-get update; apt-get full-upgrade -y; apt-get autoclean -y
|
||||
|
||||
COPY project/buildtime/gen_selfisgned_cert.sh /tmp/buildtime/gen_selfisgned_cert.sh
|
||||
RUN /bin/sh /tmp/buildtime/gen_selfsigned_cert.sh
|
||||
|
||||
COPY project/entrypoint/entrypoint.sh /entrypoint/entrypoint.sh
|
||||
COPY project/entrypoint/install-nginx-mods.sh /entrypoint/install-nginx-mods.sh
|
||||
ENTRYPOINT ["/bin/sh", "/entrypoint/entrypoint.sh"]
|
||||
|
@@ -1,4 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Generate a fresh cert every time
|
||||
openssl req -x509 -newkey rsa:4096 -sha256 -days 3650 -nodes \
|
||||
@@ -10,13 +9,3 @@ echo "Generated self-signed cert:"
|
||||
ls -l /etc/ssl/private/
|
||||
ls -l /etc/ssl/certs/
|
||||
###
|
||||
|
||||
#service php8.2-fpm start # this should be started later
|
||||
|
||||
/bin/sh /entrypoint/install-php-versions.sh
|
||||
|
||||
# Run the CMD that was passed (or default)
|
||||
#exec "$@"
|
||||
|
||||
tail -f /dev/null
|
||||
|
@@ -1,10 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
apt-get update
|
||||
|
||||
echo "Installing PHP versions: $PHP_VERSIONS"
|
||||
|
||||
for version in $PHP_VERSIONS; do
|
||||
echo "Installing PHP $version ..."
|
||||
service "php$version-fpm" start
|
||||
done
|
Reference in New Issue
Block a user