Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
90 lines (85 loc) · 2.41 KB
/
Copy pathdocker-compose.yml
File metadata and controls
90 lines (85 loc) · 2.41 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
85
86
87
88
89
90
services:
db:
image: postgres:16-alpine
environment:
POSTGRES_USER: ${POSTGRES_USER:-pulse}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-pulse_dev_only}
POSTGRES_DB: ${POSTGRES_DB:-pulse}
volumes:
- pulse_pgdata:/var/lib/postgresql/data
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-pulse} -d ${POSTGRES_DB:-pulse}"]
interval: 5s
timeout: 5s
retries: 10
start_period: 10s
redis:
image: redis:7-alpine
ports:
- "6379:6379"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 3s
retries: 10
quiver:
build:
context: ../quiver
dockerfile: infra/docker/Dockerfile
# Quiver 0.35 is configured entirely through QUIVER_* env — the `serve`
# subcommand takes no flags. Dev runs insecure (no TLS / at-rest encryption
# on the internal network); a real deployment sets QUIVER_API_KEYS +
# QUIVER_ENCRYPTION_KEY + TLS certs instead.
environment:
QUIVER_DATA_DIR: /data
QUIVER_REST_ADDR: 0.0.0.0:8080
QUIVER_GRPC_ADDR: 0.0.0.0:6334
QUIVER_API_KEYS: ${QUIVER_API_KEY:-dev-quiver-key-change-me}
QUIVER_INSECURE: "true"
volumes:
- quiver_data:/data
ports:
- "8080:8080"
# The distroless image ships no shell/wget, so there is no container
# healthcheck; the API retries ensure_collections() until Quiver is ready.
api:
build:
context: apps/api
dockerfile: ../../infra/docker/Dockerfile.api
env_file:
- .env
environment:
DATABASE_URL: postgresql+asyncpg://${POSTGRES_USER:-pulse}:${POSTGRES_PASSWORD:-pulse_dev_only}@db:5432/${POSTGRES_DB:-pulse}
QUIVER_URL: http://quiver:8080
REDIS_URL: redis://redis:6379/0
ports:
- "8000:8000"
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
quiver:
condition: service_started
healthcheck:
test: ["CMD-SHELL", "wget -qO- http://localhost:8000/health || exit 1"]
interval: 10s
timeout: 5s
retries: 10
start_period: 30s
web:
build:
context: .
dockerfile: infra/docker/Dockerfile.web
environment:
NEXT_PUBLIC_API_URL: http://localhost:8000
ports:
- "3000:3000"
depends_on:
api:
condition: service_healthy
volumes:
pulse_pgdata:
quiver_data: