Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
49 lines (45 loc) · 1.75 KB
/
Copy pathdocker-compose.yml
File metadata and controls
49 lines (45 loc) · 1.75 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
services:
db:
image: pgvector/pgvector:pg17 # pinned major version, not :latest
container_name: fastapi_pg # optional, just a friendlier name
restart: unless-stopped
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
ports:
- "${POSTGRES_PORT:-5432}:5432" # host side from .env, defaults to 5432
volumes:
- pgdata:/var/lib/postgresql/data # named volume -> Postgres data dir
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
interval: 5s
timeout: 5s
retries: 5
temporal-db:
image: postgres:17
environment: { POSTGRES_USER: temporal, POSTGRES_PASSWORD: temporal, POSTGRES_DB: temporal }
volumes: [ temporal_pgdata:/var/lib/postgresql/data ]
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U temporal -d temporal" ]
interval: 5s
timeout: 5s
retries: 5
temporal:
image: temporalio/auto-setup:1.29.0 # PIN IT: :latest ships breaking schema changes
depends_on: { temporal-db: { condition: service_healthy } }
environment:
- DB=postgres12 # driver identifier, NOT a version claim. Correct for PG17.
- DB_PORT=5432
- POSTGRES_USER=temporal
- POSTGRES_PWD=temporal
- POSTGRES_SEEDS=temporal-db
ports: [ "7233:7233" ]
temporal-ui:
image: temporalio/ui:2.42.1 # 2.42.0 was never published; nearest real patch to the pin
depends_on: [ temporal ]
environment: [ TEMPORAL_ADDRESS=temporal:7233 ]
ports: [ "8080:8080" ]
volumes:
pgdata: # declares the named volume
temporal_pgdata: # declares Temporal's own named volume