Skip to content

Commit a4d233c

Browse files
committed
Added default value to NGINX config path variable
1 parent 4d737ef commit a4d233c

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

.env.sample

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ PMA_CONTAINER_NAME=REPLACEME-PMA
1818
NGINX_VERSION=latest
1919
NGINX_CONTAINER_NAME=REPLACEME-NGINX
2020
SERVER_NAME=replaceme.com www.replaceme.com
21+
NGINX_CONFIG_PATH=./nginx/conf.d
2122
CERT_PATH=/REPLACEME
2223
CERT_CRT=replaceme.crt
2324
CERT_KEY=replaceme.key

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,4 @@ services:
5252
volumes:
5353
- ${CERT_PATH}:/etc/nginx/certs
5454
- ./www:/usr/share/nginx/html
55-
- ./nginx/conf.d:/etc/nginx/conf.d
55+
- ${NGINX_CONFIG_PATH:./nginx/conf.d}:/etc/nginx/conf.d

init.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ fi
2626

2727
if ls ${CERT_PATH}/$CERT_CRT &>/dev/null && ls ${CERT_PATH}/$CERT_KEY &>/dev/null
2828
then
29-
sed -e "s/replaceme.crt/$CERT_CRT/g" -e "s/replaceme.key/$CERT_KEY/g" -e "s/SERVERNAME/$SERVER_NAME/g" $PWD/nginx/conf.d/default.conf
29+
sed -e "s/replaceme.crt/$CERT_CRT/g" -e "s/replaceme.key/$CERT_KEY/g" -e "s/SERVERNAME/$SERVER_NAME/g" $PWD/$NGINX_CONFIG_PATH/default.conf
3030
echo "Creating Containers"
3131
docker-compose up --force-recreate -d
3232
exit 0

0 commit comments

Comments
 (0)