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:
@@ -17,7 +17,8 @@ services:
|
|||||||
# happens behind a TLS-terminating proxy — so SameSite=None cookies would be
|
# happens behind a TLS-terminating proxy — so SameSite=None cookies would be
|
||||||
# dropped by browsers on cross-origin requests. See nginx/default.conf.
|
# dropped by browsers on cross-origin requests. See nginx/default.conf.
|
||||||
nginx:
|
nginx:
|
||||||
image: nginx:alpine
|
build:
|
||||||
|
context: ./nginx
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
depends_on:
|
depends_on:
|
||||||
- couchdb
|
- couchdb
|
||||||
@@ -25,8 +26,6 @@ services:
|
|||||||
SERVICE_FQDN_NGINX_5984:
|
SERVICE_FQDN_NGINX_5984:
|
||||||
expose:
|
expose:
|
||||||
- "5984"
|
- "5984"
|
||||||
volumes:
|
|
||||||
- ./nginx/default.conf:/etc/nginx/conf.d/default.conf:ro
|
|
||||||
networks:
|
networks:
|
||||||
- default
|
- default
|
||||||
- coolify
|
- coolify
|
||||||
|
|||||||
3
nginx/Dockerfile
Normal file
3
nginx/Dockerfile
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
FROM nginx:alpine
|
||||||
|
COPY default.conf /etc/nginx/conf.d/default.conf
|
||||||
|
EXPOSE 5984
|
||||||
Reference in New Issue
Block a user