-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
57 lines (54 loc) · 1.9 KB
/
Copy pathdocker-compose.yml
File metadata and controls
57 lines (54 loc) · 1.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# ── CrewCmd Docker Compose ────────────────────────────────────────
#
# Quick start:
# cp .env.example .env
# # Edit .env and set AUTH_SECRET before exposing this service.
# docker compose up
#
# Docker Compose reads .env by default, not .env.local.
# This runs CrewCmd with a local Postgres database. For zero-config PGlite
# development, run the app outside Compose with `pnpm dev`.
# ──────────────────────────────────────────────────────────────────
services:
db:
image: postgres:17-alpine
restart: unless-stopped
environment:
POSTGRES_DB: crewcmd
POSTGRES_USER: crewcmd
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-crewcmd}
ports:
- "${POSTGRES_PORT:-5432}:5432"
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U crewcmd -d crewcmd"]
interval: 5s
timeout: 3s
retries: 10
app:
build:
context: .
dockerfile: Dockerfile
restart: unless-stopped
ports:
- "${APP_PORT:-3000}:3000"
environment:
DATABASE_URL: postgresql://crewcmd:${POSTGRES_PASSWORD:-crewcmd}@db:5432/crewcmd
AUTH_SECRET: ${AUTH_SECRET:-}
NEXT_PUBLIC_APP_URL: ${NEXT_PUBLIC_APP_URL:-http://localhost:3000}
AUTH_URL: ${NEXT_PUBLIC_APP_URL:-http://localhost:3000}
BLOB_READ_WRITE_TOKEN: ${BLOB_READ_WRITE_TOKEN:-}
HEARTBEAT_SECRET: ${HEARTBEAT_SECRET:-}
OPENCLAW_GATEWAY_URL: ${OPENCLAW_GATEWAY_URL:-}
depends_on:
db:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "wget -qO- http://127.0.0.1:3000/api/health || exit 1"]
interval: 10s
timeout: 5s
retries: 5
start_period: 15s
volumes:
pgdata: