2026-06-23 23:54:37 +00:00
|
|
|
name: ctxd
|
|
|
|
|
|
2026-06-24 22:50:54 +00:00
|
|
|
# Docker Compose reads .env automatically for variable substitution.
|
|
|
|
|
# See .env.example for all available variables.
|
2026-06-25 13:59:51 +00:00
|
|
|
#
|
|
|
|
|
# IMPORTANT: Production uses PostgreSQL (DATABASE_URL host "postgres").
|
|
|
|
|
# Always start BOTH services: docker compose up -d
|
|
|
|
|
# Or use: ./scripts/deploy.sh
|
|
|
|
|
# Do NOT use docker compose up -d --no-deps ctxd unless postgres is already running.
|
2026-06-24 22:50:54 +00:00
|
|
|
|
2026-06-23 23:54:37 +00:00
|
|
|
services:
|
2026-06-24 22:50:54 +00:00
|
|
|
postgres:
|
|
|
|
|
image: postgres:16-alpine
|
|
|
|
|
container_name: ctxd-postgres
|
|
|
|
|
restart: unless-stopped
|
|
|
|
|
environment:
|
|
|
|
|
POSTGRES_DB: ${POSTGRES_DB:-ctxd}
|
|
|
|
|
POSTGRES_USER: ${POSTGRES_USER:-ctxd}
|
|
|
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-ctxd_local_dev}
|
|
|
|
|
volumes:
|
|
|
|
|
- ${CTXD_PG_DATA:-/mnt/ai-storage/projects/ctxd/data/pg}:/var/lib/postgresql/data
|
|
|
|
|
healthcheck:
|
|
|
|
|
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-ctxd}"]
|
|
|
|
|
interval: 5s
|
|
|
|
|
timeout: 5s
|
|
|
|
|
retries: 5
|
|
|
|
|
|
2026-06-24 23:19:08 +00:00
|
|
|
ctxd:
|
2026-06-23 23:54:37 +00:00
|
|
|
build:
|
|
|
|
|
context: .
|
|
|
|
|
dockerfile: Dockerfile
|
2026-06-24 23:19:08 +00:00
|
|
|
container_name: ctxd
|
2026-06-23 23:54:37 +00:00
|
|
|
restart: unless-stopped
|
|
|
|
|
ports:
|
2026-06-24 22:50:54 +00:00
|
|
|
- "${CTXD_PORT:-9091}:${CTXD_PORT:-9091}"
|
2026-06-23 23:54:37 +00:00
|
|
|
volumes:
|
|
|
|
|
- /mnt/ai-storage/projects/ctxd/data:/data:rw
|
|
|
|
|
- /mnt/ai-storage/projects:/projects:ro
|
|
|
|
|
- /home/overseer:/host:ro
|
2026-06-24 22:50:54 +00:00
|
|
|
env_file:
|
|
|
|
|
- .env
|
2026-06-23 23:54:37 +00:00
|
|
|
environment:
|
|
|
|
|
- CTXD_HOME=/data
|
2026-06-24 22:50:54 +00:00
|
|
|
depends_on:
|
|
|
|
|
postgres:
|
|
|
|
|
condition: service_healthy
|