Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
112 lines (106 loc) · 3.13 KB
/
Copy pathdocker-compose.yml
File metadata and controls
112 lines (106 loc) · 3.13 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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
name: rust-web-fullstack
services:
postgres:
image: postgres:18.6-alpine@sha256:77f585114c32fbca283dc835b0596f4e52b51b4c6662d7810b2f4084f60a1873
container_name: rwf-postgres
environment:
POSTGRES_USER: rwf
POSTGRES_PASSWORD: rwf_dev_password
POSTGRES_DB: rwf_demo
command: ["postgres", "-c", "shared_preload_libraries=pg_stat_statements"]
ports:
- "5432:5432"
volumes:
- postgres-data:/var/lib/postgresql/data
- ./scripts/init-db.sql:/docker-entrypoint-initdb.d/01-init.sql:ro
healthcheck:
test: ["CMD-SHELL", "pg_isready -U rwf -d rwf_demo"]
interval: 5s
timeout: 3s
retries: 10
live-search:
build:
context: .
dockerfile: live-search.Dockerfile
container_name: rwf-live-search
environment:
DATABASE_URL: postgres://rwf:rwf_dev_password@postgres:5432/rwf_demo
RUST_LOG: info
ports:
- "3000:3000"
healthcheck:
test: ["CMD", "wget", "-qO-", "http://localhost:3000/readyz"]
interval: 5s
timeout: 3s
retries: 10
depends_on:
postgres:
condition: service_healthy
i18n-demo:
build:
context: .
dockerfile: i18n-demo.Dockerfile
container_name: rwf-i18n-demo
environment:
PORT: 3002
RUST_LOG: info
ports:
- "3002:3002"
healthcheck:
test: ["CMD", "wget", "-qO-", "http://localhost:3002/"]
interval: 5s
timeout: 3s
retries: 10
gateway:
build:
context: .
dockerfile: gateway.Dockerfile
container_name: rwf-gateway
ports:
- "3001:3001"
environment:
DATABASE_URL: postgres://rwf:rwf_dev_password@postgres:5432/rwf_demo
JWT_PRIVATE_KEY_PEM: "${JWT_PRIVATE_KEY_PEM:?JWT_PRIVATE_KEY_PEM must be set}"
JWT_PUBLIC_KEY_PEM: "${JWT_PUBLIC_KEY_PEM:?JWT_PUBLIC_KEY_PEM must be set}"
ADMIN_PASSWORD: "${ADMIN_PASSWORD:?ADMIN_PASSWORD must be set}"
ADMIN_USER_ID: "${ADMIN_USER_ID:-00000000-0000-0000-0000-000000000001}"
RUST_LOG: info
healthcheck:
test: ["CMD", "wget", "-qO-", "http://localhost:3001/health"]
interval: 10s
timeout: 3s
retries: 5
start_period: 15s
depends_on:
postgres:
condition: service_healthy
live-search:
condition: service_healthy
# Local HTTP profile. Ephemeral keys and non-Secure cookies are both explicit
# so browser session/CSRF flows work on http://localhost:3001.
gateway-dev:
profiles: ["dev"]
build:
context: .
dockerfile: gateway.Dockerfile
container_name: rwf-gateway-dev
ports:
- "3001:3001"
environment:
DATABASE_URL: postgres://rwf:rwf_dev_password@postgres:5432/rwf_demo
ALLOW_DEV_KEYS: "1"
ADMIN_PASSWORD: "synthetic-gateway-test-password"
RWF_GATEWAY__SESSION__COOKIE_SECURE: "false"
RUST_LOG: info
command: ["/app/gateway-example", "--dev-keys"]
healthcheck:
test: ["CMD", "wget", "-qO-", "http://localhost:3001/health"]
interval: 10s
timeout: 3s
retries: 5
start_period: 15s
depends_on:
postgres:
condition: service_healthy
volumes:
postgres-data: