Skip to content

Commit c619af3

Browse files
committed
fix: update nginx container configuration to properly mount framework directory
1 parent 14c9adb commit c619af3

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

docker-compose.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,20 @@ services:
3333
web:
3434
image: nginx:alpine
3535
volumes:
36+
- "./etc/nginx/framework:/etc/nginx/conf.d/framework"
3637
- "./etc/nginx/default.conf:/etc/nginx/conf.d/default.conf"
38+
- "./etc/nginx/default.template.conf:/etc/nginx/conf.d/default.template"
3739
- "./etc/ssl:/etc/ssl"
3840
- "./web:/var/www/html"
39-
- "./etc/nginx/default.template.conf:/etc/nginx/conf.d/default.template"
4041
ports:
4142
- "8000:80"
4243
- "3000:443"
4344
environment:
4445
- NGINX_HOST=${NGINX_HOST}
45-
command: /bin/sh -c "envsubst '$$NGINX_HOST' < /etc/nginx/conf.d/default.template > /etc/nginx/conf.d/default.conf && nginx -g 'daemon off;'"
46+
- APP_FRAMEWORK=${APP_FRAMEWORK:-default}
47+
- APP_PUBLIC_DIR=${APP_PUBLIC_DIR:-public}
48+
- NGINX_FRAMEWORK_DIR=${NGINX_FRAMEWORK_DIR:-framework}
49+
command: /bin/sh -c "envsubst '$$NGINX_HOST $$APP_FRAMEWORK $$APP_PUBLIC_DIR $$NGINX_FRAMEWORK_DIR' < /etc/nginx/conf.d/default.template > /etc/nginx/conf.d/default.conf && nginx -g 'daemon off;'"
4650
restart: always
4751
depends_on:
4852
- php

0 commit comments

Comments
 (0)