-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.temporal.yaml
88 lines (83 loc) · 2.79 KB
/
docker-compose.temporal.yaml
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
---
services:
temporal-database:
image: postgres:16.4-alpine
container_name: ${COMPOSE_PROJECT_NAME}-temporal-database
restart: on-failure
networks:
- default
ports:
- '${TEMPORAL_DB_FORWARD_PORT:-5446}:5432'
environment:
POSTGRES_USER: ${TEMPORAL_DB_USERNAME}
POSTGRES_PASSWORD: ${TEMPORAL_DB_PASSWORD}
POSTGRES_DB: ${TEMPORAL_DB_DATABASE}
volumes:
- temporal-database-data:/var/lib/postgresql/data:cached
healthcheck:
test: ['CMD', 'pg_isready', '-U', '${TEMPORAL_DB_USERNAME:-temporal}', '-d', '${TEMPORAL_DB_DATABASE:-temporal}']
interval: 3s
timeout: 1s
start_period: 0s
retries: 9
logging:
driver: ${DOCKER_TEMPORAL_DATABASE_LOG_DRIVER:-json-file}
temporal:
image: temporalio/auto-setup:1.24.2
container_name: ${COMPOSE_PROJECT_NAME}-temporal
restart: on-failure
networks:
- default
depends_on:
temporal-database:
condition: service_healthy
ports:
- '${TEMPORAL_FORWARD_PORT:-7233}:7233'
environment:
- DB=postgres12
- DB_PORT=5432
- POSTGRES_USER=${TEMPORAL_DB_USERNAME}
- POSTGRES_PWD=${TEMPORAL_DB_PASSWORD}
- POSTGRES_SEEDS=temporal-database
- DYNAMIC_CONFIG_FILE_PATH=config/dynamicconfig/development-sql.yaml
volumes:
- ./docker/temporal:/etc/temporal/config/dynamicconfig
healthcheck:
test: ['CMD-SHELL', 'tctl', '--address', '${TEMPORAL_ADDRESS:-temporal:7233}', 'workflow list']
interval: 1s
timeout: 5s
start_period: 2s
retries: 9
logging:
driver: ${DOCKER_TEMPORAL_LOG_DRIVER:-json-file}
temporal-ui:
image: temporalio/ui:2.29.2
container_name: ${COMPOSE_PROJECT_NAME}-temporal-ui
restart: on-failure
networks:
- default
- shared
depends_on:
temporal:
condition: service_healthy
environment:
- TEMPORAL_ADDRESS=temporal:7233
- TEMPORAL_CORS_ORIGINS=https://temporal.${COMPOSE_PROJECT_NAME}.docker
labels:
- traefik.enable=true
- traefik.http.routers.temporal-ui-${COMPOSE_PROJECT_NAME}.rule=Host(`temporal.${COMPOSE_PROJECT_NAME}.docker`)
- traefik.http.routers.temporal-ui-${COMPOSE_PROJECT_NAME}.entrypoints=websecure
- traefik.http.routers.temporal-ui-${COMPOSE_PROJECT_NAME}.tls=true
- traefik.http.services.temporal-ui-${COMPOSE_PROJECT_NAME}.loadbalancer.server.port=8080
- traefik.http.services.temporal-ui-${COMPOSE_PROJECT_NAME}.loadbalancer.server.scheme=http
logging:
driver: ${DOCKER_TEMPORAL_UI_LOG_DRIVER:-json-file}
volumes:
temporal-database-data:
name: ${COMPOSE_PROJECT_NAME}-temporal-database-data
networks:
shared:
external: true
name: network.${SHARED_SERVICES_NAMESPACE}
default:
name: project.${COMPOSE_PROJECT_NAME}