From f97956fa8ed6db22c1eb598d30662103cf946d36 Mon Sep 17 00:00:00 2001 From: Julien Calixte Date: Tue, 2 Jun 2026 22:18:00 +0200 Subject: [PATCH] fix(nginx): build nginx image instead of bind-mounting config MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- docker-compose.yml | 5 ++--- nginx/Dockerfile | 3 +++ 2 files changed, 5 insertions(+), 3 deletions(-) create mode 100644 nginx/Dockerfile diff --git a/docker-compose.yml b/docker-compose.yml index 67c244b..fa5a0f3 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -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 diff --git a/nginx/Dockerfile b/nginx/Dockerfile new file mode 100644 index 0000000..0021348 --- /dev/null +++ b/nginx/Dockerfile @@ -0,0 +1,3 @@ +FROM nginx:alpine +COPY default.conf /etc/nginx/conf.d/default.conf +EXPOSE 5984