Dockerfile/entrypoint.sh: move templateSite.conf to /etc/nginx to prevent double files in sites_enabled

This commit is contained in:
fleischsalatinspace 2021-09-22 18:02:17 +02:00 committed by Sam ONeill
parent 12955bc032
commit 3067f09bca
2 changed files with 4 additions and 2 deletions

View file

@ -16,7 +16,9 @@ FROM trafex/alpine-nginx-php7:ba1dd422
RUN apk update && apk add --no-cache busybox-suid sudo php7-redis php7-pdo php7-pdo_mysql php7-fileinfo shadow gettext bash apache2-utils
COPY static/nginx/nginx.conf /etc/nginx/templateNginx.conf
COPY static/nginx/site.conf /etc/nginx/sites_enabled/templateSite.conf
# we need to create sites_enabled directory in order for entrypoint.sh being able to copy file after envsubst
RUN mkdir -p /etc/nginx/sites_enabled/
COPY static/nginx/site.conf /etc/nginx/templateSite.conf
# Configure PHP-FPM
COPY static/php/fpm-pool.conf /etc/php7/php-fpm.d/zzz_custom.conf

View file

@ -1,7 +1,7 @@
#!/usr/bin/env bash
set -e
crontab /var/crontab.txt
envsubst '$DOMAIN' </etc/nginx/sites_enabled/templateSite.conf >/etc/nginx/sites_enabled/site.conf
envsubst '$DOMAIN' </etc/nginx/templateSite.conf >/etc/nginx/sites_enabled/site.conf
envsubst '$CONTAINER_NAME' </etc/nginx/templateNginx.conf >/etc/nginx/nginx.conf
envsubst </var/www/html/pathfinder/app/templateEnvironment.ini >/var/www/html/pathfinder/app/environment.ini
envsubst </var/www/html/pathfinder/app/templateConfig.ini >/var/www/html/pathfinder/app/config.ini