services: postgres: image: postgres:17-alpine environment: POSTGRES_USER: threadcord POSTGRES_PASSWORD: threadcord POSTGRES_DB: threadcord healthcheck: test: ["CMD-SHELL", "pg_isready -U threadcord -d threadcord"] interval: 2s timeout: 3s retries: 15 start_period: 5s volumes: - postgres-data:/var/lib/postgresql/data threadcord: build: . # Dockerfile ENTRYPOINT already runs tini; compose init stacked a second reaper. depends_on: postgres: condition: service_healthy env_file: - .env environment: DATABASE_URL: postgres://threadcord:threadcord@postgres:5432/threadcord WORKSPACE_ROOT: /workspaces THREADCORD_HTTP_BEARER: ${THREADCORD_HTTP_BEARER:-threadcord-dev-bearer} ports: - "3583:3583" volumes: - threadcord-workspaces:/workspaces healthcheck: test: [ "CMD", "node", "-e", "fetch('http://127.0.0.1:3583/health/live').then((r) => process.exit(r.ok ? 0 : 1)).catch(() => process.exit(1))", ] interval: 15s timeout: 5s retries: 5 start_period: 30s deploy: resources: limits: cpus: "2" memory: 4g volumes: postgres-data: threadcord-workspaces: