-
Notifications
You must be signed in to change notification settings - Fork 127
/
docker-compose-gitaly.yml
314 lines (298 loc) · 10.7 KB
/
docker-compose-gitaly.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
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
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
services:
postgres:
image: opencsg-registry.cn-beijing.cr.aliyuncs.com/opencsg_public/gradescope/postgresql-multiple-databases:14.4
environment:
POSTGRES_USER: "postgres"
POSTGRES_PASSWORD: "postgres"
POSTGRES_MULTIPLE_DATABASES: "starhub_server,mirror"
ports:
- "5433:5432"
healthcheck:
test: pg_isready -U postgres -h 127.0.0.1
interval: 5s
volumes:
- ./pgdata:/var/lib/postgresql/data
networks:
- my_network
minio:
image: opencsg-registry.cn-beijing.cr.aliyuncs.com/opencsg_public/bitnami/minio:2023
environment:
MINIO_ROOT_USER: "admin"
MINIO_ROOT_PASSWORD: "Password_123"
MINIO_SCHEME: "http"
MINIO_DEFAULT_BUCKETS: opencsg-server-lfs:public,opencsg-portal-storage:public
ports:
- "9000:9000"
- "9001:9001"
volumes:
- ./data/minio_data:/bitnami/minio/data
networks:
- my_network
redis:
image: opencsg-registry.cn-beijing.cr.aliyuncs.com/opencsg_public/redis:7.2.5
ports:
- "6379:6379"
volumes:
- ./data/redis:/data
networks:
- my_network
healthcheck:
test: redis-cli ping
interval: 1s
timeout: 3s
retries: 30
gitaly:
image: opencsg-registry.cn-beijing.cr.aliyuncs.com/opencsg_public/gitaly:v16.4.6
command:
["bash", "-c", "mkdir -p /home/git/repositories && rm -rf /srv/gitlab-shell/hooks/* && touch /srv/gitlab-shell/.gitlab_shell_secret && exec /usr/bin/env GITALY_CONFIG_FILE=/home/gitaly.config.toml /scripts/process-wrapper"]
environment:
- GITALY_CONFIG_FILE=/home/gitaly.config.toml
user: "root"
ports:
- '8075:8075'
volumes:
- ./data/gitaly/git/repositories:/home/git/repositories
- ./data/gitaly/git/hooks:/home/git/hooks
- ./data/gitaly/gitaly.config.toml:/home/gitaly.config.toml
- ./data/gitaly/log:/var/log/gitaly
networks:
- my_network
starhub_server:
image: "opencsg-registry.cn-beijing.cr.aliyuncs.com/opencsg_public/csghub_server:latest"
depends_on:
- postgres
- gitaly
- gitlab-shell
environment:
STARHUB_DATABASE_DSN: postgresql://postgres:postgres@postgres:5432/starhub_server?sslmode=disable
GIN_MODE: release
STARHUB_SERVER_API_TOKEN: ${STARHUB_SERVER_API_TOKEN}
STARHUB_SERVER_REDIS_ENDPOINT: redis:6379
STARHUB_SERVER_GITSERVER_TYPE: gitaly
STARHUB_SERVER_GITALY_SERVER_SOCKET: tcp://gitaly:8075
STARHUB_SERVER_GITALY_STORGE: default
STARHUB_SERVER_GITALY_TOKEN: abc123secret
STARHUB_SERVER_SSH_DOMAIN: ssh://git@$localhost:2222
STARHUB_SERVER_SAAS: false
STARHUB_SERVER_MIRRORSERVER_ENABLE: false
STARHUB_SERVER_S3_ACCESS_KEY_ID: admin
STARHUB_SERVER_S3_ACCESS_KEY_SECRET: Password_123
STARHUB_SERVER_S3_ENDPOINT: localhost:9000 # used to generate download links for lfs files
STARHUB_SERVER_S3_INTERNAL_ENDPOINT: localhost:9000
STARHUB_SERVER_S3_BUCKET: opencsg-server-lfs
STARHUB_SERVER_S3_REGION: cn-beijing
STARHUB_SERVER_S3_ENABLE_SSL: false
STARHUB_SERVER_ENABLE_SWAGGER: false
OPENCSG_ACCOUNTING_NATS_URL: nats://natsadmin:AkxjzcHaK4uRqInuPRLeoUYYV5xYKIWv3jlzCehgoe@natsmaster:4222
OPENCSG_ACCOUNTING_SERVER_HOST: http://account_server
OPENCSG_ACCOUNTING_SERVER_PORT: 8086
# user service conenction
OPENCSG_USER_SERVER_HOST: http://user_server
OPENCSG_USER_SERVER_PORT: 8088
# model service conenction
OPENCSG_MODERATION_SERVER_HOST: http://moderation_server
OPENCSG_MODERATION_SERVER_PORT: 8089
OPENCSG_WORKFLOW_SERVER_ENDPOINT: temporal:7233
ports:
- "8080:8080"
networks:
- my_network
user_server:
image: opencsg-registry.cn-beijing.cr.aliyuncs.com/opencsg_public/csghub_server:latest
entrypoint:
- /starhub-bin/starhub
- user
- launch
depends_on:
- postgres
environment:
STARHUB_SERVER_API_TOKEN: ${STARHUB_SERVER_API_TOKEN}
STARHUB_DATABASE_DSN: postgresql://postgres:postgres@postgres:5432/starhub_server?sslmode=disable
STARHUB_SERVER_GITSERVER_TYPE: gitaly
STARHUB_SERVER_GITALY_SERVER_SOCKET: tcp://gitaly:8075
STARHUB_SERVER_GITALY_STORGE: default
STARHUB_SERVER_GITALY_TOKEN: abc123secret
STARHUB_SERVER_CASDOOR_CLIENT_ID: ${STARHUB_SERVER_CASDOOR_CLIENT_ID}
STARHUB_SERVER_CASDOOR_CLIENT_SECRET: ${STARHUB_SERVER_CASDOOR_CLIENT_SECRET}
STARHUB_SERVER_CASDOOR_ENDPOINT: ${STARHUB_SERVER_CASDOOR_ENDPOINT}
STARHUB_SERVER_CASDOOR_CERTIFICATE: /starhub-bin/casdoor/casdoor_stg_cert-token_jwt_key.pem
STARHUB_SERVER_CASDOOR_ORGANIZATION_NAME: ${STARHUB_SERVER_CASDOOR_ORGANIZATION_NAME}
STARHUB_SERVER_CASDOOR_APPLICATION_NAME: ${STARHUB_SERVER_CASDOOR_APPLICATION_NAME}
OPENCSG_USER_SERVER_PORT: 8088
OPENCSG_USER_SERVER_SIGNIN_SUCCESS_REDIRECT_URL: http://${SERVER_DOMAIN}:${SERVER_PORT}/server/callback
OPENCSG_WORKFLOW_SERVER_ENDPOINT: temporal:7233
ports:
- "8088:8088"
restart: always
networks:
- my_network
volumes:
- ./data/casdoor/:/starhub-bin/casdoor/:r
gitlab-shell:
image: opencsg-registry.cn-beijing.cr.aliyuncs.com/opencsg_public/gitlab-shell:v16.4.6
command:
["bash", "-c", "exec /usr/bin/env SSH_DAEMON=gitlab-sshd /scripts/process-wrapper"]
environment:
SSH_DAEMON: gitlab-sshd
user: "root"
ports:
- '2223:2222'
volumes:
- ./data/gitlab-shell/config/config.yml:/srv/gitlab-shell/config.yml
- ./data/gitlab-shell/config/.gitlab_shell_secret:/srv/gitlab-shell/.gitlab_shell_secret
- ./data/gitlab-shell/config/keys:/srv/gitlab-shell/keys
- ./data/gitlab-shell/logs:/srv/gitlab-shell/logs
networks:
- my_network
natsmaster:
image: opencsg-registry.cn-beijing.cr.aliyuncs.com/opencsg_public/csghub_nats:2.10.16
deploy:
resources:
limits:
cpus: '1'
memory: 1G
reservations:
cpus: '1'
memory: 1G
ports:
- "4222:4222"
- "6222:6222"
- "8222:8222"
volumes:
- ./nats-server.conf:/nats-server.conf
- ./jetstream:/data/jetstream
restart: always
networks:
- my_network
account_server:
image: "opencsg-registry.cn-beijing.cr.aliyuncs.com/opencsg_public/csghub_server:latest"
entrypoint:
- /starhub-bin/starhub
- accounting
- launch
depends_on:
- postgres
- natsmaster
environment:
STARHUB_SERVER_API_TOKEN: ${STARHUB_SERVER_API_TOKEN}
STARHUB_DATABASE_DSN: postgresql://postgres:postgres@postgres:5432/starhub_server?sslmode=disable
OPENCSG_ACCOUNTING_SERVER_PORT: 8086
OPENCSG_ACCOUNTING_NATS_URL: nats://natsadmin:AkxjzcHaK4uRqInuPRLeoUYYV5xYKIWv3jlzCehgoe@natsmaster:4222
OPENCSG_ACCOUNTING_FEE_EVENT_SUBJECT: "accounting.fee.>"
OPENCSG_ACCOUNTING_NOTIFY_NOBALANCE_SUBJECT: "accounting.notify.nobalance"
OPENCSG_ACCOUNTING_MSG_FETCH_TIMEOUTINSEC: 5
GIN_MODE: release
ports:
- "8086:8086"
restart: always
networks:
- my_network
mirror-repo-sync:
image: "opencsg-registry.cn-beijing.cr.aliyuncs.com/opencsg_public/csghub_server:latest"
entrypoint:
- /starhub-bin/starhub
- mirror
- repo-sync
depends_on:
- redis
- gitaly
- postgres
environment:
STARHUB_DATABASE_DSN: postgresql://postgres:postgres@postgres:5432/starhub_server?sslmode=disable
STARHUB_DATABASE_TIMEZONE: Asia/Shanghai
STARHUB_SERVER_REDIS_ENDPOINT: redis:6379
STARHUB_SERVER_GITSERVER_TYPE: gitaly
STARHUB_SERVER_GITALY_SERVER_SOCKET: tcp://gitaly:8075
STARHUB_SERVER_GITALY_STORGE: default
STARHUB_SERVER_GITALY_TOKEN: abc123secret
STARHUB_SERVER_GITALY_JWT_SECRET: signing-key
# workflow
OPENCSG_WORKFLOW_SERVER_ENDPOINT: temporal:7233
restart: always
networks:
- my_network
mirror-lfs-sync:
image: "opencsg-registry.cn-beijing.cr.aliyuncs.com/opencsg_public/csghub_server:latest"
entrypoint:
- /starhub-bin/starhub
- mirror
- lfs-sync
depends_on:
- redis
- postgres
environment:
STARHUB_DATABASE_DSN: postgresql://postgres:postgres@postgres:5432/starhub_server?sslmode=disable
STARHUB_DATABASE_TIMEZONE: Asia/Shanghai
STARHUB_SERVER_REDIS_ENDPOINT: redis:6379
STARHUB_SERVER_MIRROR_REMOTE: false
STARHUB_SERVER_S3_ACCESS_KEY_ID: admin
STARHUB_SERVER_S3_ACCESS_KEY_SECRET: Password_123
STARHUB_SERVER_S3_ENDPOINT: localhost:9000
STARHUB_SERVER_S3_INTERNAL_ENDPOINT: localhost:9000
STARHUB_SERVER_S3_BUCKET: opencsg-server-lfs
STARHUB_SERVER_S3_REGION: cn-beijing
STARHUB_SERVER_S3_ENABLE_SSL: false
restart: always
networks:
- my_network
moderation_server:
image: "opencsg-registry.cn-beijing.cr.aliyuncs.com/opencsg_public/csghub_server:latest"
entrypoint:
- /starhub-bin/starhub
- moderation
- launch
depends_on:
- postgres
- gitaly
environment:
STARHUB_SERVER_API_TOKEN: ${STARHUB_SERVER_API_TOKEN}
STARHUB_DATABASE_DSN: postgresql://postgres:postgres@postgres:5432/starhub_server?sslmode=disable
STARHUB_SERVER_SENSITIVE_CHECK_ENABLE: true
STARHUB_SERVER_SENSITIVE_CHECK_ACCESS_KEY_ID: ${STARHUB_SERVER_SENSITIVE_CHECK_ACCESS_KEY_ID}
STARHUB_SERVER_SENSITIVE_CHECK_ACCESS_KEY_SECRET: ${STARHUB_SERVER_SENSITIVE_CHECK_ACCESS_KEY_SECRET}
STARHUB_SERVER_SENSITIVE_CHECK_REGION: ${STARHUB_SERVER_SENSITIVE_CHECK_REGION}
STARHUB_SERVER_GITSERVER_TYPE: gitaly
STARHUB_SERVER_GITALY_SERVER_SOCKET: tcp://gitaly:8075
STARHUB_SERVER_GITALY_STORGE: default
STARHUB_SERVER_GITALY_TOKEN: abc123secret
OPENCSG_WORKFLOW_SERVER_ENDPOINT: temporal:7233
ports:
- "8089:8089"
restart: always
networks:
- my_network
temporal:
container_name: temporal
depends_on:
- postgres
environment:
- DB=postgres12
- DB_PORT=5432
- POSTGRES_USER=postgres
- POSTGRES_PWD=postgres
- DEFAULT_NAMESPACE_RETENTION=7d
- POSTGRES_SEEDS=postgres
# uncomment to use docker hub
# image: temporalio/auto-setup:1.25.1
image: opencsg-registry.cn-beijing.cr.aliyuncs.com/opencsg_public/temporalio/auto-setup:1.25.1
networks:
- my_network
ports:
- 7233:7233
temporal-ui:
container_name: temporal-ui
depends_on:
- temporal
environment:
- TEMPORAL_ADDRESS=temporal:7233
- TEMPORAL_CORS_ORIGINS=http://localhost:3000
# uncomment to use docker hub
# image: temporalio/ui:2.30.3
image: opencsg-registry.cn-beijing.cr.aliyuncs.com/opencsg_public/temporalio/ui:2.30.3
networks:
- my_network
ports:
- 8180:8080
networks:
my_network:
driver: bridge