nginx: bake config into custom image (no single-file bind mount)

master
Boban Blaskovic 2026-05-31 17:25:53 +02:00
parent 33aac5c852
commit 6681df5a10
2 changed files with 4 additions and 2 deletions

View File

@ -2,14 +2,14 @@ name: ${STACK_NAME:-clupilot}
services:
nginx:
image: nginx:1.27-alpine
build: ./docker/nginx
image: ${STACK_NAME:-clupilot}/nginx:latest
container_name: ${STACK_NAME:-clupilot}-nginx
restart: unless-stopped
ports:
- "${HTTP_PORT:-80}:80"
volumes:
- ./app:/var/www/html
- ./docker/nginx/default.conf:/etc/nginx/conf.d/default.conf:ro
extra_hosts:
- "host.docker.internal:host-gateway"
depends_on:

2
docker/nginx/Dockerfile Normal file
View File

@ -0,0 +1,2 @@
FROM nginx:1.27-alpine
COPY default.conf /etc/nginx/conf.d/default.conf