forked from MLReef/mlreef
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
154 lines (135 loc) · 6.19 KB
/
docker-compose.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
# original source: https://github.com/sameersbn/docker-gitlab/blob/master/docker-compose.yml
version: '3.5'
# please research https://docs.docker.com/compose/environment-variables/ for howto setup your environment
services:
gateway:
container_name: gateway
image: registry.gitlab.com/mlreef/mlreef/gateway:master
restart: always
depends_on:
- gitlab
- backend
ports: ["80:80"]
env_file: local.env
networks:
- mlreef-docker-network
backend:
container_name: backend
image: registry.gitlab.com/mlreef/mlreef/backend:master
restart: always
depends_on:
- gitlab
- mlreefdb
- redis
ports: ["8080:8080"]
env_file: local.env
environment:
- SPRING_PROFILES_ACTIVE=docker
- DB_HOST=mlreefdb
- DB_PORT=5432
- DB_USER=mlreef
- DB_PASS=password # secret, use ENV var
- DB_NAME=mlreef_backend
- REDIS_HOST=redis
- STARTUP_DELAY=30
- GITHUB_CLIENT_ID=##GITHUB_CLIENT_ID##
- GITHUB_CLIENT_SECRET=##GITHUB_CLIENT_SECRET##
- FACEBOOK_CLIENT_ID=##FACEBOOK_CLIENT_ID##
- FACEBOOK_CLIENT_SECRET=##FACEBOOK_CLIENT_SECRET##
- LINKEDIN_CLIENT_ID=##LINKEDIN_CLIENT_ID##
- LINKEDIN_CLIENT_SECRET=##LINKEDIN_CLIENT_SECRET##
- GITLAB_CLIENT_ID=##GITLAB_CLIENT_ID##
- GITLAB_CLIENT_SECRET=##GITLAB_CLIENT_SECRET##
- FREELANCER_CLIENT_ID=##FREELANCER_CLIENT_ID##
- FREELANCER_CLIENT_SECRET=##FREELANCER_CLIENT_SECRET##
- LIVE_CLIENT_ID=##LIVE_CLIENT_ID##
- LIVE_CLIENT_SECRET=##LIVE_CLIENT_SECRET##
- AZURE_CLIENT_ID=##AZURE_CLIENT_ID##
- AZURE_CLIENT_SECRET=##AZURE_CLIENT_SECRET##
- STACKEXCHANGE_CLIENT_ID=##STACKEXCHANGE_CLIENT_ID##
- STACKEXCHANGE_CLIENT_SECRET=##STACKEXCHANGE_CLIENT_SECRET##
- STACKEXCHANGE_CLIENT_KEY=##STACKEXCHANGE_CLIENT_KEY##
- DEBUG_MODE=##DEBUG_MODE##
networks:
- mlreef-docker-network
gitlab:
container_name: gitlab
restart: always
image: gitlab/gitlab-ce:12.7.0-ce.0
ports:
- "10080:10080" # if changed, also change in in bin/install
- "10022:22"
- "10081:80" # needed for initial startup in bin/install
- "5050:5050"
volumes:
- gitlab-etc:/etc/gitlab:Z #CI_DELETE_LINE: this line gets removed by the CI/CD pipeline
- gitlab-log:/var/log/gitlab:Z #CI_DELETE_LINE: this line gets removed by the CI/CD pipeline:Z
- gitlab-opt:/var/opt/gitlab:Z #CI_DELETE_LINE: this line gets removed by the CI/CD pipeline
#CI_ACTIVATE- /data/gitlab-etc:/etc/gitlab:Z # this line gets activated by the CI/CD pipeline
#CI_ACTIVATE- /data/gitlab-log:/var/log/gitlab:Z # this line gets activated by the CI/CD pipeline
#CI_ACTIVATE- /data/gitlab-opt:/var/opt/gitlab:Z # this line gets activated by the CI/CD pipeline
env_file: local.env # do not remove. contains secrets
environment:
GITLAB_OMNIBUS_CONFIG: |
# This is the URL that Gitlab expects to be addressed at.
# This URL will be sent to the runners and will show up as repo cloning url
external_url 'http://gitlab:10080'
# Deactivate automatic HTTPS redirection of Gitlab's API gateway
nginx['redirect_http_to_https'] = false
# The external URL for the internal Docker registry
registry_external_url 'http://gitlab:5050'
registry_nginx['enable'] = true
# Max sizes for upload
nginx['client_max_body_size'] = "8192m"
# Access port for the internal Docker registry (has to be exposed via Docker as well)
registry_nginx['listen_port'] = 5050
# GITLAB_SSH_PORT: 10022 # TODO use correct environment parameter
GITLAB_HTTPS: 'false' # TODO evaluate if this is the correct parameter
# GITLAB_RELATIVE_URL_ROOT:
GITLAB_ROOT_PASSWORD: 'password'
GITLAB_ROOT_EMAIL:
TZ: 'Austria/Vienna' # TODO evaluate if this is the correct parameter
GITLAB_TIMEZONE: 'Vienna' # TODO evaluate if this is the correct parameter
SSL_SELF_SIGNED: 'false' # TODO evaluate if this is the correct parameter
networks:
- mlreef-docker-network
mlreefdb:
container_name: mlreefdb
restart: always
image: postgres:11.7
ports: ["6000:5432"]
volumes:
- mlreef-opt:/var/lib/postgresql:Z #CI_DELETE_LINE: this line gets removed by the CI/CD pipeline
#CI_ACTIVATE- /data/mlreef-opt:/var/lib/postgresql:Z # this line gets activated by the CI/CD pipeline
environment:
- POSTGRES_USER=mlreef
- POSTGRES_PASSWORD=password # secret, use ENV var
- POSTGRES_DB=mlreef_backend
- DB_EXTENSION=pg_trgm
networks:
- mlreef-docker-network
redis:
container_name: redis
restart: always
image: redis:6.0.0-alpine
ports: ["6379:6379"]
networks:
- mlreef-docker-network
gitlab-runner:
container_name: gitlab-runner
restart: always
image: himanchali/gitlab-runner-alpine:13.4
volumes:
#CI_ACTIVATE- /data/gitlab-runner:/etc/gitlab-runner/:Z # this line gets activated by the CI/CD pipeline
- /var/run/docker.sock:/var/run/docker.sock # needed for "docker in docker" to work
networks:
- mlreef-docker-network
volumes:
sock:
gitlab-etc: #CI_DELETE_LINE: this line gets removed by the CI/CD pipeline (.gitlab-ci.yml)
gitlab-log: #CI_DELETE_LINE: this line gets removed by the CI/CD pipeline (.gitlab-ci.yml)
gitlab-opt: #CI_DELETE_LINE: this line gets removed by the CI/CD pipeline (.gitlab-ci.yml)
mlreef-opt: #CI_DELETE_LINE: this line gets removed by the CI/CD pipeline (.gitlab-ci.yml)
networks:
mlreef-docker-network:
name: mlreef-docker-network