-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
99 lines (93 loc) · 2.33 KB
/
Copy pathdocker-compose.yml
File metadata and controls
99 lines (93 loc) · 2.33 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
services:
postgresql:
image: postgres:16
environment:
POSTGRES_USER: temporal
POSTGRES_PASSWORD: temporal
POSTGRES_DB: temporal
ports:
- "5432:5432"
volumes:
- postgresql_data:/var/lib/postgresql/data
- ./docker/init-taskapp-db.sh:/docker-entrypoint-initdb.d/init-taskapp-db.sh
healthcheck:
test: ["CMD-SHELL", "pg_isready -U temporal"]
interval: 5s
timeout: 5s
retries: 10
networks:
- temporal-network
temporal:
image: temporalio/auto-setup:latest
depends_on:
postgresql:
condition: service_healthy
environment:
- DB=postgres12
- DB_PORT=5432
- POSTGRES_USER=temporal
- POSTGRES_PWD=temporal
- POSTGRES_SEEDS=postgresql
ports:
- "7233:7233"
healthcheck:
test: ["CMD", "tctl", "--address", "temporal:7233", "cluster", "health"]
interval: 5s
timeout: 5s
retries: 20
start_period: 15s
networks:
- temporal-network
temporal-ui:
image: temporalio/ui:latest
depends_on:
- temporal
environment:
- TEMPORAL_ADDRESS=temporal:7233
- TEMPORAL_CORS_ORIGINS=http://localhost:8080
ports:
- "8080:8080"
networks:
- temporal-network
worker:
build: .
command: watchfiles --filter python "python run.py worker" /app
depends_on:
temporal:
condition: service_healthy
postgresql:
condition: service_healthy
restart: on-failure
environment:
- TEMPORAL_ADDRESS=temporal:7233
- DATABASE_URL=postgresql+asyncpg://temporal:temporal@postgresql:5432/taskapp
volumes:
- .:/app
networks:
- temporal-network
human-task-ui:
build: .
command: sh -c "python run.py migrate && python run.py ui --reload"
depends_on:
temporal:
condition: service_healthy
postgresql:
condition: service_healthy
restart: on-failure
environment:
- TEMPORAL_ADDRESS=temporal:7233
- DATABASE_URL=postgresql+asyncpg://temporal:temporal@postgresql:5432/taskapp
- SESSION_SECRET=change-me-in-production
- SEED_USERNAME=admin
- SEED_PASSWORD=admin
volumes:
- .:/app
ports:
- "8090:8090"
networks:
- temporal-network
networks:
temporal-network:
driver: bridge
volumes:
postgresql_data: