services: postgres: image: postgres:16-alpine environment: POSTGRES_DB: shipyard POSTGRES_USER: shipyard POSTGRES_PASSWORD: shipyard ports: - "${SHIPYARD_POSTGRES_HOST_PORT:-5432}:5432" volumes: - postgres-data:/var/lib/postgresql/data - ../migrations:/docker-entrypoint-initdb.d:ro healthcheck: test: ["CMD-SHELL", "pg_isready -U shipyard -d shipyard"] interval: 5s timeout: 3s retries: 20 api: build: context: .. dockerfile: deploy/rust.Dockerfile args: BIN: shipyard-api environment: DATABASE_URL: postgres://shipyard:shipyard@postgres:5432/shipyard SHIPYARD_API_BIND: 0.0.0.0:8080 SHIPYARD_AUTH_DOMAIN: ${SHIPYARD_AUTH_DOMAIN:-localhost} SHIPYARD_AUTH_URL: ${SHIPYARD_AUTH_URL:-http://localhost:8080/v1/auth/login} RUST_LOG: shipyard_api=info,tower_http=info depends_on: postgres: condition: service_healthy ports: - "${SHIPYARD_API_HOST_PORT:-8080}:8080" worker: build: context: .. dockerfile: deploy/rust.Dockerfile args: BIN: shipyard-worker environment: DATABASE_URL: postgres://shipyard:shipyard@postgres:5432/shipyard RUST_LOG: shipyard_worker=info SHIPYARD_WORKER_TICK_SECONDS: ${SHIPYARD_WORKER_TICK_SECONDS:-5} SHIPYARD_WORKER_BASE_BACKOFF_SECONDS: ${SHIPYARD_WORKER_BASE_BACKOFF_SECONDS:-30} depends_on: postgres: condition: service_healthy dvm: build: context: .. dockerfile: deploy/rust.Dockerfile args: BIN: shipyard-dvm environment: DATABASE_URL: postgres://shipyard:shipyard@postgres:5432/shipyard SHIPYARD_DVM_RELAYS: ${SHIPYARD_DVM_RELAYS:-wss://relay.damus.io,wss://relay.primal.net} # REQUIRED: set SHIPYARD_DVM_SECRET_KEY to a 64-char random hex string (32 bytes). # Generate with: openssl rand -hex 32 # Never commit this value; inject it via environment or a secrets manager. SHIPYARD_DVM_SECRET_KEY: ${SHIPYARD_DVM_SECRET_KEY} SHIPYARD_DVM_TICK_SECONDS: ${SHIPYARD_DVM_TICK_SECONDS:-5} RUST_LOG: shipyard_dvm=info depends_on: postgres: condition: service_healthy web: build: context: .. dockerfile: deploy/web.Dockerfile environment: PUBLIC_SHIPYARD_API_URL: ${PUBLIC_SHIPYARD_API_URL:-http://localhost:8080} PUBLIC_SHIPYARD_AUTH_DOMAIN: ${PUBLIC_SHIPYARD_AUTH_DOMAIN:-localhost} PUBLIC_SHIPYARD_AUTH_URL: ${PUBLIC_SHIPYARD_AUTH_URL:-http://localhost:8080/v1/auth/login} NODE_ENV: production ports: - "${SHIPYARD_WEB_HOST_PORT:-3000}:3000" depends_on: - api volumes: postgres-data: