-
Notifications
You must be signed in to change notification settings - Fork 4
/
docker-compose.yml
123 lines (118 loc) · 3.49 KB
/
docker-compose.yml
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
113
114
115
116
117
118
119
120
121
122
123
version: '3.8'
volumes:
postgres:
services:
postgres:
image: "postgres:14-alpine"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U payments -p ${POSTGRES_PORT:-5432}"]
interval: 10s
timeout: 5s
retries: 5
ports:
- "${POSTGRES_PORT:-5432}:${POSTGRES_PORT:-5432}"
environment:
POSTGRES_USER: "payments"
POSTGRES_PASSWORD: "payments"
POSTGRES_DB: "payments"
command: -p ${POSTGRES_PORT:-5432}
volumes:
- ./local_env/postgres/init.sql:/docker-entrypoint-initdb.d/init.sql
payments-migrate:
image: golang:1.23.4-alpine
command: go run ./ migrate up
depends_on:
postgres:
condition: service_healthy
volumes:
- .:/app/components/payments
working_dir: /app/components/payments
environment:
POSTGRES_URI: postgres://payments:payments@postgres:${POSTGRES_PORT:-5432}/payments?sslmode=disable
temporal:
image: temporalio/auto-setup:1.25.0
depends_on:
postgres:
condition: service_healthy
environment:
DB: postgres12
DB_PORT: 5432
POSTGRES_USER: payments
POSTGRES_PWD: payments
POSTGRES_SEEDS: postgres
DYNAMIC_CONFIG_FILE_PATH: config/dynamicconfig/development-sql.yaml
ports:
- 7233:7233
volumes:
- ./local_env/postgres/temporal-sql.yaml:/etc/temporal/config/dynamicconfig/development-sql.yaml
temporal-admin-tools:
container_name: temporal-admin-tools
depends_on:
- temporal
environment:
- TEMPORAL_ADDRESS=temporal:7233
- TEMPORAL_CLI_ADDRESS=temporal:7233
image: temporalio/admin-tools:1.25.0-tctl-1.18.1-cli-1.0.0
stdin_open: true
tty: true
temporal-ui:
container_name: temporal-ui
depends_on:
- temporal
environment:
- TEMPORAL_ADDRESS=temporal:7233
- TEMPORAL_CORS_ORIGINS=http://localhost:3000
image: temporalio/ui:2.26.2
ports:
- 8081:8080
payments:
image: golang:1.23.4-alpine
command: go run ./ server
healthcheck:
test: [ "CMD", "curl", "-f", "http://127.0.0.1:8080/_healthcheck" ]
interval: 10s
timeout: 5s
retries: 5
depends_on:
postgres:
condition: service_healthy
payments-migrate:
condition: service_completed_successfully
ports:
- "8080:8080"
- "9090:9090"
volumes:
- .:/app/components/payments
working_dir: /app/components/payments
environment:
DEBUG: true
POSTGRES_URI: postgres://payments:payments@postgres:${POSTGRES_PORT:-5432}/payments?sslmode=disable
CONFIG_ENCRYPTION_KEY: mysuperencryptionkey
TEMPORAL_ADDRESS: temporal:7233
PLUGIN_MAGIC_COOKIE: mysupercookie
TEMPORAL_INIT_SEARCH_ATTRIBUTES: true
payments-worker:
image: golang:1.23.4-alpine
command: go run ./ worker
healthcheck:
test: [ "CMD", "curl", "-f", "http://127.0.0.1:8080/_healthcheck" ]
interval: 10s
timeout: 5s
retries: 5
depends_on:
postgres:
condition: service_healthy
payments-migrate:
condition: service_completed_successfully
ports:
- "9191:9090"
volumes:
- .:/app/components/payments
working_dir: /app/components/payments
environment:
DEBUG: true
POSTGRES_URI: postgres://payments:payments@postgres:${POSTGRES_PORT:-5432}/payments?sslmode=disable
CONFIG_ENCRYPTION_KEY: mysuperencryptionkey
TEMPORAL_ADDRESS: temporal:7233
PLUGIN_MAGIC_COOKIE: mysupercookie
TEMPORAL_INIT_SEARCH_ATTRIBUTES: false