Move compose to repo root with context:. (fixes Coolify build-context path)

Coolify runs compose with --project-directory=repo-root, so context:.. resolved above the repo and the build context/Dockerfiles weren't found. Root compose + context:. matches the Dockerfiles' assumption (context = repo root).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-12 10:35:10 +02:00
parent 4c0af9c406
commit 1f1b69b035

View File

@@ -1,18 +1,17 @@
# Visigine — single-stack compose. Frontend (nginx) is the only ingress;
# the backend container is reachable only over the internal docker network.
# Visigine — deployment compose at the REPO ROOT so build contexts resolve
# correctly under Coolify (which runs compose with --project-directory = repo root).
# Frontend (nginx) is the only ingress; the backend is reachable only over the
# internal docker network. Dockerfiles live in docker/ and assume context = root.
#
# Secrets (MISTRAL_KEY, ADMIN_TOKEN) are read from ../server/.env.
# Deployment vars (NODE_ENV, ALLOWED_ORIGINS, …) are overridden here.
# Secrets (MISTRAL_KEY, ADMIN_TOKEN, …) are injected from Coolify env vars.
name: visigine
services:
backend:
build:
context: ..
context: .
dockerfile: docker/backend.Dockerfile
# Secrets are injected from Coolify env vars (set them in the Coolify UI).
# server/.env is git-ignored and absent in Coolify's clone — so no env_file.
environment:
NODE_ENV: production
PORT: "3001"
@@ -35,12 +34,9 @@ services:
frontend:
build:
context: ..
context: .
dockerfile: docker/frontend.Dockerfile
# No host port binding: on the Coolify server host-port 8080 is already taken
# by the Coolify/Traefik proxy. Coolify routes the domain (visigine.de) to
# this container's port 80 via Traefik. For local `docker compose` testing,
# temporarily add: ports: ["8090:80"]
# No host port binding: Coolify/Traefik routes visigine.de to this port 80.
expose:
- "80"
depends_on: