-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
197 lines (189 loc) · 6.33 KB
/
Copy pathdocker-compose.yml
File metadata and controls
197 lines (189 loc) · 6.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
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
services:
postgres:
image: postgres:16
init: true
stop_grace_period: 5s
environment:
- POSTGRES_USER=geoduels
- POSTGRES_PASSWORD=geoduels
- POSTGRES_DB=geoduels
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U geoduels -d geoduels"]
interval: 5s
timeout: 3s
retries: 20
volumes:
- postgres-data:/var/lib/postgresql/data
redis:
image: redis:7
command: ["redis-server", "--save", "", "--appendonly", "no"]
init: true
stop_grace_period: 3s
ports:
- "6379:6379"
gameplay-node:
image: golang:1.26
working_dir: /app
init: true
stop_grace_period: 5s
volumes:
- ./:/app
- go-build-cache:/root/.cache/go-build
- go-mod-cache:/go/pkg/mod
command: ["sh", "./scripts/air-run.sh", "./services/gameplay-node", "gameplay-node"]
environment:
- AIR_VERSION=v1.61.7
- GAMEPLAY_NODE_ADDR=:8091
- GAMEPLAY_NODE_ID=game-1
- GAMEPLAY_PUBLIC_ROUTE=game-1
- GAMEPLAY_INTERNAL_URL=http://gameplay-node:8091
- POSTGRES_URL=${DOCKER_POSTGRES_URL:-postgres://geoduels:geoduels@postgres:5432/geoduels?sslmode=disable}
- REDIS_URL=${DOCKER_REDIS_URL:-redis://redis:6379}
- APP_AUTH_SECRET=${APP_AUTH_SECRET}
- GAMEPLAY_TICKET_SECRET=${GAMEPLAY_TICKET_SECRET}
- COORDINATOR_INTERNAL_SECRET=${COORDINATOR_INTERNAL_SECRET}
- APP_ACCESS_TOKEN_TTL=${APP_ACCESS_TOKEN_TTL}
- APP_REFRESH_TOKEN_TTL=${APP_REFRESH_TOKEN_TTL}
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_started
ports:
- "8091:8091"
match-coordinator:
image: golang:1.26
working_dir: /app
init: true
stop_grace_period: 5s
volumes:
- ./:/app
- go-build-cache:/root/.cache/go-build
- go-mod-cache:/go/pkg/mod
command: ["sh", "./scripts/air-run.sh", "./services/match-coordinator", "match-coordinator"]
environment:
- AIR_VERSION=v1.61.7
- MATCH_COORDINATOR_ADDR=:8090
- REDIS_URL=${DOCKER_REDIS_URL:-redis://redis:6379}
- POSTGRES_URL=${DOCKER_POSTGRES_URL:-postgres://geoduels:geoduels@postgres:5432/geoduels?sslmode=disable}
- APP_AUTH_SECRET=${APP_AUTH_SECRET}
- GAMEPLAY_TICKET_SECRET=${GAMEPLAY_TICKET_SECRET}
- COORDINATOR_INTERNAL_SECRET=${COORDINATOR_INTERNAL_SECRET}
ports:
- "8090:8090"
depends_on:
redis:
condition: service_started
gameplay-node:
condition: service_started
postgres:
condition: service_healthy
realtime-gateway:
image: golang:1.26
working_dir: /app
init: true
stop_grace_period: 5s
volumes:
- ./:/app
- go-build-cache:/root/.cache/go-build
- go-mod-cache:/go/pkg/mod
command: ["sh", "./scripts/air-run.sh", "./services/realtime-gateway", "realtime-gateway"]
environment:
- AIR_VERSION=v1.61.7
- REALTIME_GATEWAY_ADDR=:8092
- REDIS_URL=${DOCKER_REDIS_URL:-redis://redis:6379}
ports:
- "8092:8092"
depends_on:
redis:
condition: service_started
gameplay-node:
condition: service_started
api:
image: golang:1.26
working_dir: /app
init: true
stop_grace_period: 5s
volumes:
- ./:/app
- go-build-cache:/root/.cache/go-build
- go-mod-cache:/go/pkg/mod
command: ["sh", "./scripts/air-run.sh", "./services/api", "api"]
environment:
- AIR_VERSION=v1.61.7
- MATCH_COORDINATOR_URL=${DOCKER_MATCH_COORDINATOR_URL:-http://match-coordinator:8090}
- POSTGRES_URL=${DOCKER_POSTGRES_URL:-postgres://geoduels:geoduels@postgres:5432/geoduels?sslmode=disable}
- REDIS_URL=${DOCKER_REDIS_URL:-redis://redis:6379}
- APP_AUTH_SECRET=${APP_AUTH_SECRET}
- GAMEPLAY_TICKET_SECRET=${GAMEPLAY_TICKET_SECRET}
- COORDINATOR_INTERNAL_SECRET=${COORDINATOR_INTERNAL_SECRET}
- APP_ACCESS_TOKEN_TTL=${APP_ACCESS_TOKEN_TTL}
- APP_REFRESH_TOKEN_TTL=${APP_REFRESH_TOKEN_TTL}
- GUEST_SIGNUP_IP_LIMIT=${GUEST_SIGNUP_IP_LIMIT}
- GUEST_SIGNUP_IP_WINDOW=${GUEST_SIGNUP_IP_WINDOW}
- TRUSTED_PROXY_CIDRS=${TRUSTED_PROXY_CIDRS}
- ADMIN_BOOTSTRAP_EMAILS=${ADMIN_BOOTSTRAP_EMAILS}
- GOOGLE_CLIENT_ID=${GOOGLE_CLIENT_ID}
- GOOGLE_CLIENT_SECRET=${GOOGLE_CLIENT_SECRET}
- GOOGLE_ISSUER=${GOOGLE_ISSUER}
- DISCORD_CLIENT_ID=${DISCORD_CLIENT_ID}
- DISCORD_CLIENT_SECRET=${DISCORD_CLIENT_SECRET}
- STRIPE_MODE=${STRIPE_MODE}
- STRIPE_TEST_PAYMENT_LINK_URL=${STRIPE_TEST_PAYMENT_LINK_URL}
- STRIPE_TEST_WEBHOOK_SECRET=${STRIPE_TEST_WEBHOOK_SECRET}
- STRIPE_LIVE_PAYMENT_LINK_URL=${STRIPE_LIVE_PAYMENT_LINK_URL}
- STRIPE_LIVE_WEBHOOK_SECRET=${STRIPE_LIVE_WEBHOOK_SECRET}
- STRIPE_PAYMENT_LINK_URL=${STRIPE_PAYMENT_LINK_URL}
- STRIPE_WEBHOOK_SECRET=${STRIPE_WEBHOOK_SECRET}
ports:
- "8080:8080"
depends_on:
- match-coordinator
moderation-worker:
image: golang:1.26
working_dir: /app
init: true
stop_grace_period: 5s
volumes:
- ./:/app
- go-build-cache:/root/.cache/go-build
- go-mod-cache:/go/pkg/mod
command: ["sh", "./scripts/air-run.sh", "./services/moderation-worker", "moderation-worker"]
environment:
- AIR_VERSION=v1.61.7
- MODERATION_WORKER_ADDR=:8093
- POSTGRES_URL=${DOCKER_POSTGRES_URL:-postgres://geoduels:geoduels@postgres:5432/geoduels?sslmode=disable}
- RISK_ENGINE_URL=${RISK_ENGINE_URL:-}
- RISK_ENGINE_TOKEN=${RISK_ENGINE_TOKEN:-}
- RISK_ENGINE_TIMEOUT=${RISK_ENGINE_TIMEOUT:-750ms}
ports:
- "8093:8093"
depends_on:
postgres:
condition: service_healthy
discord-worker:
image: golang:1.26
working_dir: /app
init: true
stop_grace_period: 5s
volumes:
- ./:/app
- go-build-cache:/root/.cache/go-build
- go-mod-cache:/go/pkg/mod
command: ["sh", "./scripts/air-run.sh", "./services/discord-worker", "discord-worker"]
environment:
- AIR_VERSION=v1.61.7
- DISCORD_WORKER_ADDR=:8094
- POSTGRES_URL=${DOCKER_POSTGRES_URL:-postgres://geoduels:geoduels@postgres:5432/geoduels?sslmode=disable}
- DISCORD_BOT_TOKEN=${DISCORD_BOT_TOKEN}
ports:
- "8094:8094"
depends_on:
postgres:
condition: service_healthy
volumes:
postgres-data:
go-build-cache:
go-mod-cache: