Bake Nginx config into image at build time instead of bind mount - fixes Coolify deployment

This commit is contained in:
Monarch055
2026-06-11 01:01:19 +07:00
parent ff41562702
commit 99f6909dfe
2 changed files with 9 additions and 3 deletions
+2 -3
View File
@@ -3,12 +3,11 @@ version: '3.8'
services:
# 1. Nginx Gateway Reverse Proxy
gateway:
image: nginx:alpine
build:
context: ./docker/nginx # Build from our custom Dockerfile
container_name: gis_gateway
ports:
- "${HOST_PORT_GATEWAY:-80}:80"
volumes:
- ./docker/nginx/default.conf:/etc/nginx/conf.d/default.conf:ro
depends_on:
- php-app
- next-app
+7
View File
@@ -0,0 +1,7 @@
FROM nginx:alpine
# Copy the Nginx configuration into the image at build time.
# This avoids bind-mount issues on production servers (e.g., Coolify).
COPY default.conf /etc/nginx/conf.d/default.conf
EXPOSE 80