This repository was archived by the owner on Nov 9, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
203 lines (184 loc) · 5.98 KB
/
docker-compose.yaml
File metadata and controls
203 lines (184 loc) · 5.98 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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
services:
# Application database services
postgres:
image: postgres:17
container_name: postgres_db
restart: always
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
volumes:
- pgdata:/var/lib/postgresql/data
ports:
- "${POSTGRES_PORT}:${POSTGRES_PORT}"
networks:
- app_network
healthcheck:
test: ["CMD-SHELL", "pg_isready -p ${POSTGRES_PORT} -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
command: -p ${POSTGRES_PORT}
hasura:
image: hasura/graphql-engine:latest
container_name: hasura_engine
restart: always
depends_on:
postgres:
condition: service_healthy
environment:
HASURA_GRAPHQL_DATABASE_URL: postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:${POSTGRES_PORT}/${POSTGRES_DB}
HASURA_GRAPHQL_ADMIN_SECRET: ${HASURA_ADMIN_SECRET}
HASURA_GRAPHQL_DEV_MODE: ${HASURA_GRAPHQL_DEV_MODE}
HASURA_GRAPHQL_ENABLE_CONSOLE: true
HASURA_GRAPHQL_METADATA_DIR: /hasura-metadata
HASURA_GRAPHQL_MIGRATIONS_DIR: /hasura-migrations
ports:
- "${HASURA_PORT}:8080"
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:8080/healthz || exit 1"]
interval: 30s
timeout: 3s
retries: 3
start_period: 30s
networks:
- app_network
volumes:
- ./hasura/export:/hasura-export
- ./hasura/scripts:/hasura-scripts
# Temporal services
temporal-postgresql:
container_name: temporal-postgresql
environment:
POSTGRES_PASSWORD: ${TEMPORAL_POSTGRES_PASSWORD}
POSTGRES_USER: ${TEMPORAL_POSTGRES_USER}
image: postgres:13
networks:
- temporal-network
ports:
- "${TEMPORAL_POSTGRES_PORT}:${TEMPORAL_POSTGRES_PORT}"
volumes:
- temporal-pgdata:/var/lib/postgresql/data
command: -p ${TEMPORAL_POSTGRES_PORT}
healthcheck:
test: ["CMD-SHELL", "pg_isready -p ${TEMPORAL_POSTGRES_PORT} -U ${TEMPORAL_POSTGRES_USER} -d temporal"]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
temporal:
container_name: temporal
depends_on:
temporal-postgresql:
condition: service_healthy
environment:
DB: postgres12 # do not change this
DB_PORT: ${TEMPORAL_POSTGRES_PORT}
POSTGRES_USER: ${TEMPORAL_POSTGRES_USER}
POSTGRES_PWD: ${TEMPORAL_POSTGRES_PASSWORD}
POSTGRES_SEEDS: temporal-postgresql
DYNAMIC_CONFIG_FILE_PATH: config/dynamicconfig/development-sql.yaml
ENABLE_ES: false
image: temporalio/auto-setup:${TEMPORAL_VERSION}
networks:
- temporal-network
ports:
- "${TEMPORAL_PORT}:7233"
volumes:
- ./dynamicconfig:/etc/temporal/config/dynamicconfig
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:${TEMPORAL_ADMINTOOLS_VERSION}
networks:
- temporal-network
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
- TEMPORAL_CSRF_COOKIE_INSECURE=true
image: temporalio/ui:${TEMPORAL_UI_VERSION}
networks:
- temporal-network
ports:
- "${TEMPORAL_UI_PORT}:8080"
# Base templates for application services
x-api-service-base: &api-service-base
build:
context: .
dockerfile: Dockerfile
restart: always
networks:
- app_network
- temporal-network # Add temporal network to web service
depends_on:
hasura:
condition: service_healthy
temporal:
condition: service_started
volumes:
- ./config.yaml:/app/config.yaml
x-temporal-service-base: &temporal-service-base
<<: *api-service-base
depends_on:
api:
condition: service_started
# Application services
api:
<<: *api-service-base
container_name: api_container
ports:
- "${WEB_PORT}:7921"
command: poetry run python /app/kvmworkflows/web/server.py
worker_sync_bbox:
<<: *temporal-service-base
container_name: sync_bbox_worker
command: poetry run python /app/kvmworkflows/workers/sync_bbox.py
runner_sync_bbox:
<<: *temporal-service-base
container_name: sync_bbox_runner
command: poetry run python /app/kvmworkflows/runners/sync_bbox.py
worker_send_subscription_emails:
<<: *temporal-service-base
container_name: send_subscription_emails_worker
command: poetry run python /app/kvmworkflows/workers/send_subscription_emails.py hourly
runner_area_subscription_entry_creation_hourly:
<<: *temporal-service-base
container_name: area_subscription_entry_creation_hourly_runner
command: poetry run python /app/kvmworkflows/runners/area_subscription/entry_creation.py hourly
runner_area_subscription_entry_creation_daily:
<<: *temporal-service-base
container_name: area_subscription_entry_creation_daily_runner
command: poetry run python /app/kvmworkflows/runners/area_subscription/entry_creation.py daily
runner_area_subscription_entry_creation_weekly:
<<: *temporal-service-base
container_name: area_subscription_entry_creation_weekly_runner
command: poetry run python /app/kvmworkflows/runners/area_subscription/entry_creation.py weekly
runner_area_subscription_entry_creation_monthly:
<<: *temporal-service-base
container_name: area_subscription_entry_creation_monthly_runner
command: poetry run python /app/kvmworkflows/runners/area_subscription/entry_creation.py yearly
networks:
app_network:
driver: bridge
temporal-network:
driver: bridge
name: temporal-network
volumes:
pgdata:
driver: local
# temporal-elasticsearch-data:
# driver: local
temporal-pgdata:
driver: local