fix(deploy): use repo-root build context in coolify compose

Coolify invokes `docker compose` with --project-directory set to the
repository root, not this file's directory. Previous `context: ..` was
resolving to /artifacts (one level above the repo) and failing with
`resolve : lstat /artifacts/docker: no such file or directory`.

Switch all three services (web, collab, mcp) to `context: .` so the
build context is the repo root and `dockerfile: docker/Dockerfile.X`
resolves correctly.

Made-with: Cursor
This commit is contained in:
Randall Stillwell 2026-04-26 21:52:29 -05:00
parent 663bc77afe
commit 0cf1e6f317

View file

@ -7,16 +7,20 @@
# - Set domains in Coolify on the `web` and `collab` services using http://
# (CT 100 Traefik handles TLS termination per AGENT-DEPLOY.md)
#
# Path conventions:
# Coolify invokes `docker compose` with --project-directory set to the
# repository root, NOT this file's directory. So all build contexts and
# dockerfile paths below are written relative to the repo root.
#
# Differences vs. docker/docker-compose.yml:
# - No bundled postgres / redis (uses shared CT 102 services)
# - No host port mappings (Coolify's Traefik routes by container labels)
# - Uses Coolify SERVICE_FQDN_* magic env vars so Coolify auto-wires Traefik labels
# - Build context is the repository root (Coolify clones the whole repo there)
services:
web:
build:
context: ..
context: .
dockerfile: docker/Dockerfile.web
restart: unless-stopped
environment:
@ -64,7 +68,7 @@ services:
collab:
build:
context: ..
context: .
dockerfile: docker/Dockerfile.collab
restart: unless-stopped
environment:
@ -91,7 +95,7 @@ services:
# for future HTTP/SSE transport. Comment the whole block out if not needed.
mcp:
build:
context: ..
context: .
dockerfile: docker/Dockerfile.mcp
args:
MCP_SERVER_PORT: ${MCP_SERVER_PORT:-3001}