forked from OpenCSGs/csghub
-
Notifications
You must be signed in to change notification settings - Fork 0
/
all-in-one-CN.yml
169 lines (160 loc) · 5.55 KB
/
all-in-one-CN.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
version: '2.4'
services:
nginx:
image: registry.cn-beijing.aliyuncs.com/opencsg_public/csghub_nginx:latest
ports:
- 80:80
volumes:
- ./nginx/logs:/var/log/nginx
- ./nginx/tmpdata:/var/nginx/client_body_temp
environment:
- SERVER_DOMAIN=${SERVER_DOMAIN}
privileged: true
networks:
- opencsg
restart: always
postgres:
image: registry.cn-beijing.aliyuncs.com/opencsg_public/csghub_postgres:14.4
environment:
POSTGRES_USER: "postgres"
POSTGRES_PASSWORD: "sdfa23Sh!322"
POSTGRES_MULTIPLE_DATABASES: "starhub_server,gitea"
ports:
- "5433:5432"
networks:
- opencsg
healthcheck:
test: pg_isready -U postgres -h 127.0.0.1
interval: 5s
csghub_portal:
image: registry.cn-beijing.aliyuncs.com/opencsg_public/csghub_portal:latest
restart: always
command: >
bash -c "bundle exec rails assets:precompile
&& bundle exec rails db:create
&& bundle exec rails db:migrate
&& bundle exec rails db:seed
&& bundle exec rails s -p 3000 -b '0.0.0.0'"
volumes:
- ./log:/myapp/log
environment:
DATABASE_URL: postgresql://postgres:sdfa23Sh!322@postgres:5432/open_portal_db
ASSET_HOST: http://127.0.0.1:3000
RAILS_MASTER_KEY: 64f15f995b044427e43fe4897370fd66
RAILS_SERVE_STATIC_FILES: 'false'
STARHUB_BASE_URL: http://csghub_server:8080
STARHUB_TOKEN: ${HUB_SERVER_API_TOKEN:-c7ab4948c36d6ecdf35fd4582def759ddd820f8899f5ff365ce16d7185cb2f609f3052e15681e931897259872391cbf46d78f4e75763a0a0633ef52abcdc840c}
BUCKET_NAME: opencsg-portal-storage
ENDPOINT: http://${SERVER_DOMAIN}:9000
ACCESS_ID: admin
ACCESS_SECRET: Password_123
REGION: cn-beijing
ON_PREMISE: true
FORCE_PATH_STYLE: true
ports:
- "3000:3000"
networks:
- opencsg
depends_on:
- postgres
csghub_server:
image: registry.cn-beijing.aliyuncs.com/opencsg_public/csghub_server:latest
depends_on:
- postgres
- gitea
environment:
STARHUB_SERVER_GITSERVER_URL: http://${SERVER_DOMAIN}/gitserver
STARHUB_SERVER_FRONTEND_URL: http://${SERVER_DOMAIN}
STARHUB_DATABASE_DSN: postgresql://postgres:sdfa23Sh!322@postgres:5432/starhub_server?sslmode=disable
STARHUB_DATABASE_TIMEZONE: Asia/Shanghai
STARHUB_SERVER_GITSERVER_HOST: http://gitea:3001
STARHUB_SERVER_GITSERVER_USERNAME: root
STARHUB_SERVER_GITSERVER_PASSWORD: password123
STARHUB_SERVER_GITSERVER_WEBHOOK_URL: http://csghub_server:8080/api/v1/callback/git
GITEA_USERNAME: root
GITEA_PASSWORD: password123
POSTGRES_USER: postgres
POSTGRES_PASSWORD: sdfa23Sh!322
POSTGRES_DB: starhub_server
GIN_MODE: release
STARHUB_SERVER_API_TOKEN: ${HUB_SERVER_API_TOKEN:-c7ab4948c36d6ecdf35fd4582def759ddd820f8899f5ff365ce16d7185cb2f609f3052e15681e931897259872391cbf46d78f4e75763a0a0633ef52abcdc840c}
STARHUB_SERVER_S3_ACCESS_KEY_ID: admin
STARHUB_SERVER_S3_ACCESS_KEY_SECRET: Password_123
STARHUB_SERVER_S3_ENDPOINT: minio:9000 # used to generate download links for lfs files
STARHUB_SERVER_S3_BUCKET: opencsg-server-lfs
STARHUB_SERVER_S3_REGION: cn-beijing
STARHUB_SERVER_MIRRORSERVER_TYPE: gitea
STARHUB_SERVER_MIRRORSERVER_HOST: http://${SERVER_DOMAIN}/gitserver
STARHUB_SERVER_MIRRORSERVER_USERNAME: root
STARHUB_SERVER_MIRRORSERVER_PASSWORD: password123
ports:
- "8080:8080"
restart: always
networks:
- opencsg
gitea:
image: registry.cn-beijing.aliyuncs.com/opencsg_public/csghub_git:latest
depends_on:
- postgres
environment:
- GITEA_ROOT_URL=http://${SERVER_DOMAIN}/gitserver
- GITEA_DOMAIN=${SERVER_DOMAIN}/gitserver
- GITEA_SSH_DOMAIN=${SERVER_DOMAIN}
- GITEA_HTTP_PORT=3001
- GITEA_SSH_LISTEN_PORT=2222
- GITEA_ADMIN_USER=root
- GITEA_ADMIN_PASSWORD=password123
- GITEA_DATABASE_TYPE=postgres
- GITEA_DATABASE_HOST=postgres
- GITEA_DATABASE_PORT_NUMBER=5432
- GITEA_DATABASE_NAME=gitea
- GITEA_DATABASE_USERNAME=postgres
- GITEA_DATABASE_PASSWORD=sdfa23Sh!322
- GITEA_DATABASE_SSL_MODE=disable
- GITEA_APP_NAME=git
- GITEA_SMTP_ENABLED=false
- BITNAMI_DEBUG=true
- GITEA_LFS_ROOT_PATH=/opt/bitnami/gitea/data/lfs
- GITEA_LFS_START_SERVER=true
- GITEA_LFS_STORAGE_TYPE=minio
- GITEA_LFS_MINIO_ACCESS_KEY_ID=admin
- GITEA_LFS_MINIO_SECRET_ACCESS_KEY=Password_123
- GITEA_LFS_MINIO_ENDPOINT=minio:9000
- GITEA_LFS_MINIO_BUCKET=opencsg-server-lfs
- GITEA_LFS_MINIO_LOCATION=cn-beijing
- GITEA_LFS_MINIO_USE_SSL=false
- GITEA_SERVICE_DEFAULT_ALLOW_CREATE_ORGANIZATION=true
- GITEA_SERVICE_DISABLE_REGISTRATION=false
ports:
- "3001:3001"
- "2222:2222"
healthcheck:
test: curl -fSs 127.0.0.1:3001/api/healthz || exit 1
interval: 5s
timeout: 10s
retries: 3
networks:
- opencsg
privileged: true
restart: always
minio:
image: registry.cn-beijing.aliyuncs.com/opencsg_public/csghub_minio:latest
ports:
- "9000:9000" # api
- "9001:9001" # console
environment:
MINIO_ROOT_USER: admin
MINIO_ROOT_PASSWORD: Password_123
MINIO_DEFAULT_BUCKETS: opencsg-server-lfs:public,opencsg-portal-storage:public
MINIO_SCHEME: http
volumes:
- minio_data:/bitnami/minio/data
networks:
- opencsg
networks:
opencsg:
driver: bridge
volumes:
minio_data:
driver: local