Files
CTXD/app/docker-compose.yml
T

46 lines
1.3 KiB
YAML
Raw Normal View History

2026-06-23 23:54:37 +00:00
name: ctxd
# 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-23 23:54:37 +00:00
services:
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
ctxd:
2026-06-23 23:54:37 +00:00
build:
context: .
dockerfile: Dockerfile
container_name: ctxd
2026-06-23 23:54:37 +00:00
restart: unless-stopped
ports:
- "${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
env_file:
- .env
2026-06-23 23:54:37 +00:00
environment:
- CTXD_HOME=/data
depends_on:
postgres:
condition: service_healthy