Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
84 lines (79 loc) · 2.37 KB
/
Copy pathdocker-compose.yml
File metadata and controls
84 lines (79 loc) · 2.37 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
services:
postgres:
image: postgres:16-alpine
environment:
POSTGRES_USER: heightproof
POSTGRES_PASSWORD: heightproof
POSTGRES_DB: heightproof
ports:
- "5432:5432"
volumes:
- heightproof-postgres:/var/lib/postgresql/data
- ./infra/migrations:/docker-entrypoint-initdb.d:ro
healthcheck:
test: ["CMD-SHELL", "pg_isready -U heightproof"]
interval: 5s
timeout: 5s
retries: 10
redis:
image: redis:7-alpine
ports:
- "6379:6379"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 5s
retries: 10
api:
build:
context: .
dockerfile: infra/node.Dockerfile
args:
WORKSPACE: apps/api
environment:
PORT: 8080
DATABASE_URL: postgres://heightproof:heightproof@postgres:5432/heightproof
REDIS_URL: redis://redis:6379
HEIGHTPROOF_API_KEY: dev-heightproof-key
# These three flags default to disabled whenever NODE_ENV=production (which the API's own
# Dockerfile sets). They're explicit here, not just relying on that default, because they're
# what makes `docker compose up --build` usable out of the box: a demo login, the shared dev
# API key, and sample traffic so the dashboard isn't empty on first boot. Removing them is
# safe (the stack still runs) but breaks the zero-config demo experience for new users. Do not
# set any of these to "true" on a real deployment you're exposing publicly.
HEIGHTPROOF_ALLOW_DEV_FALLBACK_KEY: "true"
HEIGHTPROOF_BOOTSTRAP_DEMO_USER: "true"
HEIGHTPROOF_SEED_DEMO_EVENTS: "true"
ports:
- "8080:8080"
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
worker:
build:
context: .
dockerfile: infra/node.Dockerfile
args:
WORKSPACE: apps/worker
environment:
DATABASE_URL: postgres://heightproof:heightproof@postgres:5432/heightproof
REDIS_URL: redis://redis:6379
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
dashboard:
build:
context: .
dockerfile: infra/dashboard.Dockerfile
environment:
VITE_HEIGHTPROOF_API_URL: http://localhost:8080
ports:
- "5173:5173"
depends_on:
- api
volumes:
heightproof-postgres: