version: '3.8'
services:
postgres:
image: postgres:15-alpine
container_name: cedros-postgres
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: claw_spawn
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
claw-spawn:
build:
context: .
dockerfile: Dockerfile
container_name: claw-spawn
environment:
CLAW_DATABASE_URL: postgres://postgres:postgres@postgres:5432/claw_spawn
CLAW_DIGITALOCEAN_TOKEN: ${CLAW_DIGITALOCEAN_TOKEN}
CLAW_ENCRYPTION_KEY: ${CLAW_ENCRYPTION_KEY}
CLAW_SERVER_HOST: 0.0.0.0
CLAW_SERVER_PORT: 8080
ports:
- "8080:8080"
depends_on:
postgres:
condition: service_healthy
volumes:
- ./migrations:/app/migrations:ro
volumes:
postgres_data: