-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
178 lines (169 loc) · 4.93 KB
/
docker-compose.yml
File metadata and controls
178 lines (169 loc) · 4.93 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
services:
pipelines:
extends:
file: pipelines/docker-compose.yml
service: pipelines
networks:
- civicpatch_net
civicpatch-org:
extends:
file: civicpatch.org/docker-compose.yml
service: civicpatch-org
networks:
- civicpatch_net
civicpatch-org-redis:
extends:
file: civicpatch.org/docker-compose.yml
service: civicpatch-org-redis
networks:
- civicpatch_net
api-frontend:
build:
context: .
dockerfile: civicpatch.org/Dockerfile
target: frontend-dev
ports:
- "5173:5173"
volumes:
- ./civicpatch.org/src/frontend:/app
- /app/node_modules
networks:
- civicpatch_net
civicpatch-org-db:
extends:
file: civicpatch.org/docker-compose.yml
service: civicpatch-org-db
networks:
- civicpatch_net
civicpatch-org-worker:
extends:
file: civicpatch.org/docker-compose.yml
service: civicpatch-org-worker
networks:
- civicpatch_net
depends_on:
temporal:
condition: service_healthy
# ── Temporal worker ────────────────────────────────────────────────────────
worker:
build:
context: .
dockerfile: worker/Dockerfile
depends_on:
temporal:
condition: service_healthy
environment:
TEMPORAL_HOST: temporal:7233
TEMPORAL_NAMESPACE: default
GITHUB_APP_ID: ${GITHUB_APP_ID}
GITHUB_APP_PRIVATE_KEY_BASE64: ${GITHUB_APP_PRIVATE_KEY_BASE64}
GITHUB_APP_INSTALLATION_ID: ${GITHUB_APP_INSTALLATION_ID}
GITHUB_ORG: ${GITHUB_ORG:-CivicPatch}
GITHUB_REPO: ${GITHUB_REPO:-server}
CIVICPATCH_ORG_URL: http://civicpatch-org:8000
SERVICE_API_KEY: ${SERVICE_API_KEY}
CIVICPATCH_LOCAL_URL: http://pipelines:8001
volumes:
- ./worker/src:/app/src
- ./shared/src/shared:/app/src/shared
networks:
- civicpatch_net
restart: unless-stopped
# ── Temporal ───────────────────────────────────────────────────────────────
temporal-postgres:
image: postgres:16
stop_grace_period: 30s
environment:
POSTGRES_PASSWORD: temporal
POSTGRES_USER: temporal
networks:
- civicpatch_net
volumes:
- temporal_db_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U temporal"]
interval: 5s
timeout: 5s
retries: 60
start_period: 30s
temporal-admin-tools:
image: ghcr.io/civicpatch/civicpatch_temporal_admin_tools:latest
build:
context: ./worker/temporal
dockerfile: Dockerfile.admin-tools
restart: on-failure:6
depends_on:
temporal-postgres:
condition: service_healthy
environment:
- DB=postgres12
- DB_PORT=5432
- POSTGRES_USER=temporal
- POSTGRES_PWD=temporal
- POSTGRES_SEEDS=temporal-postgres
- SQL_PASSWORD=temporal
networks:
- civicpatch_net
entrypoint: ["/bin/sh"]
command: /scripts/setup-postgres.sh
temporal:
image: ghcr.io/civicpatch/civicpatch_temporal:latest
build:
context: ./worker/temporal
dockerfile: Dockerfile.temporal
depends_on:
temporal-admin-tools:
condition: service_completed_successfully
environment:
- DB=postgres12
- DB_PORT=5432
- POSTGRES_USER=temporal
- POSTGRES_PWD=temporal
- POSTGRES_SEEDS=temporal-postgres
- BIND_ON_IP=0.0.0.0
- DYNAMIC_CONFIG_FILE_PATH=config/dynamicconfig/development-sql.yaml
ports:
- "7233:7233"
networks:
- civicpatch_net
healthcheck:
test: ["CMD", "nc", "-z", "localhost", "7233"]
interval: 5s
timeout: 3s
start_period: 30s
retries: 60
temporal-create-namespace:
image: ghcr.io/civicpatch/civicpatch_temporal_admin_tools:latest
build:
context: ./worker/temporal
dockerfile: Dockerfile.admin-tools
restart: on-failure:5
depends_on:
temporal:
condition: service_healthy
environment:
- TEMPORAL_ADDRESS=temporal:7233
- DEFAULT_NAMESPACE=default
networks:
- civicpatch_net
entrypoint: ["/bin/sh"]
command: /scripts/create-namespace.sh
temporal-ui:
image: temporalio/ui:2.34.0
depends_on:
temporal:
condition: service_healthy
environment:
- TEMPORAL_ADDRESS=temporal:7233
- TEMPORAL_CORS_ORIGINS=http://localhost:8080
ports:
- "8002:8080"
networks:
- civicpatch_net
# ── End Temporal ───────────────────────────────────────────────────────────
networks:
civicpatch_net:
driver: bridge
volumes:
api_civicpatch_org_db_data:
temporal_db_data: