Remove /etc/cont-init.d ties to nlss/php-nginx:7.4 image

This commit is contained in:
Aleksandar Puharic 2023-01-20 17:32:48 +01:00
parent a1563b89f4
commit 68da285e90
Signed by: xZero707
GPG Key ID: 3CC53DCAA9C237BB
4 changed files with 26 additions and 3 deletions

View File

@ -17,9 +17,6 @@ COPY --from=nlss/attr ["/usr/local/bin/attr", "/usr/local/bin/"]
# Add crond service
COPY --from=nlss/base-alpine:3.14 ["/etc/services.d/cron/", "/etc/services.d/cron/"]
# Add container init tasks
COPY --from=nlss/php-nginx:7.4 ["/etc/cont-init.d/", "/etc/cont-init.d/"]
# Add php-fpm configuration
COPY --from=nlss/php-nginx:7.4 ["/usr/local/etc/php-fpm.d/", "/usr/local/etc/php-fpm.d/"]

View File

@ -0,0 +1,12 @@
#!/usr/bin/with-contenv sh
set -e
echo "Redirecting nginx logs to output streams..."
# General logs
ln -sf /dev/stdout /var/log/nginx/access.log
ln -sf /dev/stderr /var/log/nginx/error.log
# App specific logs
ln -sf /dev/stdout /var/log/nginx/app-access.log
ln -sf /dev/stderr /var/log/nginx/app-error.log

View File

@ -0,0 +1,10 @@
#!/usr/bin/with-contenv sh
set -e
echo "Parsing virtual host template..."
/usr/local/bin/gomplate -V \
-o /etc/nginx/sites-available/app.conf \
-f /etc/templates/tmpl-app-nginx.conf
echo "Enabling virtual host..."
ln -sf /etc/nginx/sites-available/app.conf /etc/nginx/sites-enabled/app.conf

View File

@ -0,0 +1,4 @@
#!/usr/bin/with-contenv sh
set -e
attr /var/www true www-data:www-data 0770 2771/etc/cont-init.d