fix(nginx): build nginx image instead of bind-mounting config

Coolify's build context and runtime mount paths don't share the repo
tree the way a plain docker compose up does — the bind mount of
./nginx/default.conf failed at container start because the host path
didn't exist. Switch to a build: context: ./nginx pattern (same as
the signup service) so the config is baked into the image at build
time.
This commit is contained in:
Julien Calixte
2026-06-02 22:18:00 +02:00
parent 40011e2003
commit f97956fa8e
2 changed files with 5 additions and 3 deletions

View File

@@ -17,7 +17,8 @@ services:
# happens behind a TLS-terminating proxy — so SameSite=None cookies would be
# dropped by browsers on cross-origin requests. See nginx/default.conf.
nginx:
image: nginx:alpine
build:
context: ./nginx
restart: unless-stopped
depends_on:
- couchdb
@@ -25,8 +26,6 @@ services:
SERVICE_FQDN_NGINX_5984:
expose:
- "5984"
volumes:
- ./nginx/default.conf:/etc/nginx/conf.d/default.conf:ro
networks:
- default
- coolify

3
nginx/Dockerfile Normal file
View File

@@ -0,0 +1,3 @@
FROM nginx:alpine
COPY default.conf /etc/nginx/conf.d/default.conf
EXPOSE 5984