Files
CIAgent/docker-compose.yml
T
sakshamandClaude Sonnet 5 4867793b66 Git Repository link always shows, defaulting to the canonical upstream repo
Previously hidden entirely when NEXT_PUBLIC_GIT_REPO_URL was unset, which
meant it never appeared on localhost or on anyone else's clone that hadn't
explicitly configured it. It should always point somewhere - the canonical
repo (git.ciagent.org) is the sensible default everywhere, overridable only
by a deployment that runs its own separate git server.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
2026-08-05 20:56:48 -04:00

115 lines
3.1 KiB
YAML

name: ci-agent
services:
postgres:
image: postgres:16-alpine
restart: unless-stopped
environment:
POSTGRES_USER: ciagent
POSTGRES_PASSWORD: ciagent
POSTGRES_DB: ciagent
ports:
- "5432:5432"
volumes:
- postgres-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ciagent -d ciagent"]
interval: 5s
timeout: 5s
retries: 10
redis:
image: redis:7-alpine
restart: unless-stopped
ports:
- "6379:6379"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 5s
retries: 10
api:
build:
context: .
dockerfile: infrastructure/docker/api.Dockerfile
restart: unless-stopped
env_file: .env
environment:
DATABASE_URL: postgresql+psycopg://ciagent:ciagent@postgres:5432/ciagent
REDIS_URL: redis://redis:6379/0
ports:
- "8000:8000"
volumes:
- ./apps/api:/app
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
command: >
sh -c "alembic upgrade head &&
uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload"
worker:
build:
context: .
dockerfile: infrastructure/docker/api.Dockerfile
restart: unless-stopped
env_file: .env
environment:
DATABASE_URL: postgresql+psycopg://ciagent:ciagent@postgres:5432/ciagent
REDIS_URL: redis://redis:6379/0
volumes:
- ./apps/api:/app
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
command: celery -A app.tasks.celery_app worker --loglevel=INFO -Q default,collection,analysis,notifications,maintenance,enrichment
beat:
build:
context: .
dockerfile: infrastructure/docker/api.Dockerfile
restart: unless-stopped
env_file: .env
environment:
DATABASE_URL: postgresql+psycopg://ciagent:ciagent@postgres:5432/ciagent
REDIS_URL: redis://redis:6379/0
volumes:
- ./apps/api:/app
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
command: celery -A app.tasks.celery_app beat --loglevel=INFO
web:
build:
context: .
dockerfile: infrastructure/docker/web.Dockerfile
restart: unless-stopped
environment:
# Baked into the browser bundle - must be an address the *browser*
# (not the container) can reach, so a LAN client needs this set to
# the host machine's LAN IP, not localhost. See .env.example.
NEXT_PUBLIC_API_URL: ${NEXT_PUBLIC_API_URL:-http://localhost:8000}
# "Git Repository" landing-page link - blank here so the frontend
# falls back to its own hardcoded default (the canonical upstream
# repo). Only set this to point the button at a different git server.
NEXT_PUBLIC_GIT_REPO_URL: ${NEXT_PUBLIC_GIT_REPO_URL:-}
ports:
- "3000:3000"
volumes:
- ./apps/web:/app
- /app/node_modules
- /app/.next
depends_on:
- api
volumes:
postgres-data: