Show More
@@ -1,334 +1,336 b'' | |||||
1 | version: '3.9' |
|
1 | version: '3.9' | |
2 |
|
2 | |||
3 | x-logging: &custom-logging |
|
3 | x-logging: &custom-logging | |
4 | # docker plugin install grafana/loki-docker-driver:2.7.1 --alias loki --grant-all-permissions |
|
4 | # docker plugin install grafana/loki-docker-driver:2.7.1 --alias loki --grant-all-permissions | |
5 | # NOTE: loki logging driver ONLY works for host type networks... |
|
5 | # NOTE: loki logging driver ONLY works for host type networks... | |
6 | driver: loki |
|
6 | driver: loki | |
7 | options: |
|
7 | options: | |
8 | loki-url: "http://loki:3100/loki/api/v1/push" |
|
8 | #loki-url: "http://loki:3100/loki/api/v1/push" | |
|
9 | loki-url: "http://127.0.0.1:3100/loki/api/v1/push" | |||
9 | loki-retries: "5" |
|
10 | loki-retries: "5" | |
10 | loki-timeout: "1s" |
|
11 | loki-timeout: "1s" | |
11 | loki-max-backoff: "800ms" |
|
12 | loki-max-backoff: "800ms" | |
12 |
|
13 | |||
13 |
|
14 | |||
14 | services: |
|
15 | services: | |
15 |
|
16 | |||
16 | rhodecode: |
|
17 | rhodecode: | |
17 | networks: |
|
18 | networks: | |
18 | - rhodecode_network |
|
19 | - rhodecode_network | |
19 | extra_hosts: |
|
20 | extra_hosts: | |
20 | - "host.docker.internal:host-gateway" |
|
21 | - "host.docker.internal:host-gateway" | |
21 | image: rhodecode/rhodecode-${RC_EDITION}:${RC_VERSION:-4.28.0} |
|
22 | image: rhodecode/rhodecode-${RC_EDITION}:${RC_VERSION:-4.28.0} | |
22 | stdin_open: true |
|
23 | stdin_open: true | |
23 | tty: true |
|
24 | tty: true | |
24 | restart: always |
|
25 | restart: always | |
25 | env_file: |
|
26 | env_file: | |
26 | - ${RC_ENV_FILE:?must-specify-rc-env-file} |
|
27 | - ${RC_ENV_FILE:?must-specify-rc-env-file} | |
27 | command: [ |
|
28 | command: [ | |
28 | "/usr/local/bin/rhodecode_bin/bin/gunicorn", |
|
29 | "/usr/local/bin/rhodecode_bin/bin/gunicorn", | |
29 | "--name=gunicorn-rhodecode-1", |
|
30 | "--name=gunicorn-rhodecode-1", | |
30 | "--error-logfile=-", |
|
31 | "--error-logfile=-", | |
31 | "--paster=/etc/rhodecode/conf/rhodecode.ini", |
|
32 | "--paster=/etc/rhodecode/conf/rhodecode.ini", | |
32 | "--config=/etc/rhodecode/conf/gunicorn_conf_rc.py" |
|
33 | "--config=/etc/rhodecode/conf/gunicorn_conf_rc.py" | |
33 | ] |
|
34 | ] | |
34 | deploy: |
|
35 | deploy: | |
35 | # override this in .custom/docker-compose-apps.override.yaml to scale up |
|
36 | # override this in .custom/docker-compose-apps.override.yaml to scale up | |
36 | replicas: 1 |
|
37 | replicas: 1 | |
37 |
|
38 | |||
38 | # ports: |
|
39 | # ports: | |
39 | # - "127.0.0.1::10020" |
|
40 | # - "127.0.0.1::10020" | |
40 |
|
41 | |||
41 | build: |
|
42 | build: | |
42 | context: . |
|
43 | context: . | |
43 | dockerfile: service/rhodecode/rhodecode.dockerfile |
|
44 | dockerfile: service/rhodecode/rhodecode.dockerfile | |
44 | args: |
|
45 | args: | |
45 | TZ: ${TZ} |
|
46 | TZ: ${TZ} | |
46 | RHODECODE_VERSION: ${RC_VERSION:-4.28.0} |
|
47 | RHODECODE_VERSION: ${RC_VERSION:-4.28.0} | |
47 | RHODECODE_DB: postgresql://rhodecode:${DB_PASSWORD:?must-specify-db-password}@database/${DB_NAME:?must-specify-db-name} |
|
48 | RHODECODE_DB: postgresql://rhodecode:${DB_PASSWORD:?must-specify-db-password}@database/${DB_NAME:?must-specify-db-name} | |
48 | RHODECODE_USER_NAME: ${RHODECODE_USER_NAME} |
|
49 | RHODECODE_USER_NAME: ${RHODECODE_USER_NAME} | |
49 | RHODECODE_USER_PASS: ${RHODECODE_USER_PASS} |
|
50 | RHODECODE_USER_PASS: ${RHODECODE_USER_PASS} | |
50 | RHODECODE_USER_EMAIL: ${RHODECODE_USER_EMAIL} |
|
51 | RHODECODE_USER_EMAIL: ${RHODECODE_USER_EMAIL} | |
51 |
|
52 | |||
52 | environment: |
|
53 | environment: | |
53 | RC_APP_TYPE: rhodecode_http |
|
54 | RC_APP_TYPE: rhodecode_http | |
54 | RC_APP_PROC: 1 |
|
55 | RC_APP_PROC: 1 | |
55 | SSL_CERT_FILE: "/etc/rhodecode/conf/ca-bundle.crt" |
|
56 | SSL_CERT_FILE: "/etc/rhodecode/conf/ca-bundle.crt" | |
56 | REQUESTS_CA_BUNDLE: "/etc/rhodecode/conf/ca-bundle.crt" |
|
57 | REQUESTS_CA_BUNDLE: "/etc/rhodecode/conf/ca-bundle.crt" | |
57 | GIT_SSL_CAINFO: "/etc/rhodecode/conf/ca-bundle.crt" |
|
58 | GIT_SSL_CAINFO: "/etc/rhodecode/conf/ca-bundle.crt" | |
58 | GEVENT_RESOLVER: "ares" |
|
59 | GEVENT_RESOLVER: "ares" | |
59 |
|
60 | |||
60 | DB_UPGRADE: 1 # run the DB upgrade |
|
61 | DB_UPGRADE: 1 # run the DB upgrade | |
61 | SETUP_APP: 1 # run the application default settings setup, can be turned off after initial run |
|
62 | SETUP_APP: 1 # run the application default settings setup, can be turned off after initial run | |
62 | #FORCE_DB_INIT_FILE: 1 # force the database init, warning: destroys old DB |
|
63 | #FORCE_DB_INIT_FILE: 1 # force the database init, warning: destroys old DB | |
63 | #FORCE_RC_SETUP_APP: 1 # force running setup scripts for configuration/license application |
|
64 | #FORCE_RC_SETUP_APP: 1 # force running setup scripts for configuration/license application | |
64 | MAIN_INI_PATH: /etc/rhodecode/conf/rhodecode.ini |
|
65 | MAIN_INI_PATH: /etc/rhodecode/conf/rhodecode.ini | |
65 |
|
66 | |||
66 | # SVN Specific |
|
67 | # SVN Specific | |
67 | MOD_DAV_SVN_PORT: 8090 |
|
68 | MOD_DAV_SVN_PORT: 8090 | |
68 | APACHE_LOG_DIR: /var/log/rhodecode/svn |
|
69 | APACHE_LOG_DIR: /var/log/rhodecode/svn | |
69 | MOD_DAV_SVN_CONF_FILE: /etc/rhodecode/conf/svn/mod_dav_svn.conf |
|
70 | MOD_DAV_SVN_CONF_FILE: /etc/rhodecode/conf/svn/mod_dav_svn.conf | |
70 |
|
71 | |||
71 | healthcheck: |
|
72 | healthcheck: | |
72 | test: [ "CMD", "curl", "-A", "RhodeCode-Healthcheck", "-s", "-o", "/dev/null", "-w", "'%{http_code}'", "http://127.0.0.1:10020/_admin/ops/ping" ] |
|
73 | test: [ "CMD", "curl", "-A", "RhodeCode-Healthcheck", "-s", "-o", "/dev/null", "-w", "'%{http_code}'", "http://127.0.0.1:10020/_admin/ops/ping" ] | |
73 | timeout: 30s |
|
74 | timeout: 30s | |
74 | interval: 60s |
|
75 | interval: 60s | |
75 | retries: 10 |
|
76 | retries: 10 | |
76 |
|
77 | |||
77 | # depends_on: |
|
78 | # depends_on: | |
78 | # - database |
|
79 | # - database | |
79 | # - redis |
|
80 | # - redis | |
80 | # - channelstream |
|
81 | # - channelstream | |
81 |
|
82 | |||
82 | volumes: |
|
83 | volumes: | |
83 | - confvolume:/etc/rhodecode/conf |
|
84 | - confvolume:/etc/rhodecode/conf | |
84 | - logvolume:/var/log/rhodecode |
|
85 | - logvolume:/var/log/rhodecode | |
85 | - rc_reposvolume:/var/opt/rhodecode_repo_store |
|
86 | - rc_reposvolume:/var/opt/rhodecode_repo_store | |
86 | - rc_datavolume:/var/opt/rhodecode_data |
|
87 | - rc_datavolume:/var/opt/rhodecode_data | |
87 |
|
88 | |||
88 | tmpfs: |
|
89 | tmpfs: | |
89 | - /data_ramdisk:size=${RC_DATA_RAMDISK_SIZE:?specify-RC_DATA_RAMDISK_SIZE-env-var} |
|
90 | - /data_ramdisk:size=${RC_DATA_RAMDISK_SIZE:?specify-RC_DATA_RAMDISK_SIZE-env-var} | |
90 |
|
91 | |||
91 | logging: |
|
92 | logging: | |
92 | *custom-logging |
|
93 | *custom-logging | |
93 |
|
94 | |||
94 | labels: |
|
95 | labels: | |
95 | - "traefik.enable=true" |
|
96 | - "traefik.enable=true" | |
96 | - "traefik.http.routers.rhodecode.entrypoints=http" |
|
97 | - "traefik.http.routers.rhodecode.entrypoints=http" | |
97 | - "traefik.http.routers.rhodecode.rule=Host(`${RC_HOSTNAME:?must-specify-rhodecode-hostname}`)" |
|
98 | - "traefik.http.routers.rhodecode.rule=Host(`${RC_HOSTNAME:?must-specify-rhodecode-hostname}`)" | |
98 | - "traefik.http.routers.rhodecode.service=rhodecode-web" |
|
99 | - "traefik.http.routers.rhodecode.service=rhodecode-web" | |
99 | - "traefik.http.services.rhodecode-web.loadbalancer.server.port=10020" |
|
100 | - "traefik.http.services.rhodecode-web.loadbalancer.server.port=10020" | |
100 | # SSL + proxy prefix example, should be put into .custom/docker-compose-apps.override.yaml |
|
101 | # SSL + proxy prefix example, should be put into .custom/docker-compose-apps.override.yaml | |
101 | #- "traefik.http.routers.rhodecode-rt.entrypoints=https" |
|
102 | #- "traefik.http.routers.rhodecode-rt.entrypoints=https" | |
102 | #- "traefik.http.routers.rhodecode-rt.rule=Host(`${RC_HOSTNAME:?must-specify-rhodecode-hostname}`)" |
|
103 | #- "traefik.http.routers.rhodecode-rt.rule=Host(`${RC_HOSTNAME:?must-specify-rhodecode-hostname}`)" | |
103 | #- "traefik.http.routers.rhodecode-rt.tls=true" |
|
104 | #- "traefik.http.routers.rhodecode-rt.tls=true" | |
104 | #- "traefik.http.routers.rhodecode-rt.service=rhodecode-ssl" |
|
105 | #- "traefik.http.routers.rhodecode-rt.service=rhodecode-ssl" | |
105 | #- "traefik.http.services.rhodecode-ssl.loadbalancer.server.port=10020" |
|
106 | #- "traefik.http.services.rhodecode-ssl.loadbalancer.server.port=10020" | |
106 |
|
107 | |||
107 | vcsserver: |
|
108 | vcsserver: | |
108 | networks: |
|
109 | networks: | |
109 | - rhodecode_network |
|
110 | - rhodecode_network | |
110 | extra_hosts: |
|
111 | extra_hosts: | |
111 | - "host.docker.internal:host-gateway" |
|
112 | - "host.docker.internal:host-gateway" | |
112 | image: rhodecode/rhodecode-${RC_EDITION}:${RC_VERSION:-4.28.0} |
|
113 | image: rhodecode/rhodecode-${RC_EDITION}:${RC_VERSION:-4.28.0} | |
113 |
|
114 | |||
114 | stdin_open: true |
|
115 | stdin_open: true | |
115 | tty: true |
|
116 | tty: true | |
116 | restart: always |
|
117 | restart: always | |
117 | env_file: |
|
118 | env_file: | |
118 | - ${RC_ENV_FILE:?must-specify-rc-env-file} |
|
119 | - ${RC_ENV_FILE:?must-specify-rc-env-file} | |
119 | command: [ |
|
120 | command: [ | |
120 | "/home/rhodecode/.rccontrol/vcsserver-1/profile/bin/gunicorn", |
|
121 | "/home/rhodecode/.rccontrol/vcsserver-1/profile/bin/gunicorn", | |
121 | "--name=gunicorn-vcsserver-1", |
|
122 | "--name=gunicorn-vcsserver-1", | |
122 | "--error-logfile=-", |
|
123 | "--error-logfile=-", | |
123 | "--paster=/etc/rhodecode/conf/vcsserver.ini", |
|
124 | "--paster=/etc/rhodecode/conf/vcsserver.ini", | |
124 | "--config=/etc/rhodecode/conf/gunicorn_conf_vcs.py" |
|
125 | "--config=/etc/rhodecode/conf/gunicorn_conf_vcs.py" | |
125 | ] |
|
126 | ] | |
126 | deploy: |
|
127 | deploy: | |
127 | # override this in .custom/docker-compose-apps.override.yaml to scale up |
|
128 | # override this in .custom/docker-compose-apps.override.yaml to scale up | |
128 | replicas: 1 |
|
129 | replicas: 1 | |
129 |
|
130 | |||
130 | # ports: |
|
131 | # ports: | |
131 | # - "127.0.0.1::10010" |
|
132 | # - "127.0.0.1::10010" | |
132 |
|
133 | |||
133 | healthcheck: |
|
134 | healthcheck: | |
134 | test: [ "CMD", "curl", "-A", "RhodeCode-Healthcheck", "-s", "-o", "/dev/null", "-w", "'%{http_code}'", "http://127.0.0.1:10010/status" ] |
|
135 | test: [ "CMD", "curl", "-A", "RhodeCode-Healthcheck", "-s", "-o", "/dev/null", "-w", "'%{http_code}'", "http://127.0.0.1:10010/status" ] | |
135 | timeout: 30s |
|
136 | timeout: 30s | |
136 | interval: 60s |
|
137 | interval: 60s | |
137 | retries: 10 |
|
138 | retries: 10 | |
138 |
|
139 | |||
139 | environment: |
|
140 | environment: | |
140 | RC_APP_TYPE: rhodecode_vcsserver |
|
141 | RC_APP_TYPE: rhodecode_vcsserver | |
141 | RC_APP_PROC: 1 |
|
142 | RC_APP_PROC: 1 | |
142 | MAIN_INI_PATH: /etc/rhodecode/conf/vcsserver.ini |
|
143 | MAIN_INI_PATH: /etc/rhodecode/conf/vcsserver.ini | |
143 | SSL_CERT_FILE: "/etc/rhodecode/conf/ca-bundle.crt" |
|
144 | SSL_CERT_FILE: "/etc/rhodecode/conf/ca-bundle.crt" | |
144 | REQUESTS_CA_BUNDLE: "/etc/rhodecode/conf/ca-bundle.crt" |
|
145 | REQUESTS_CA_BUNDLE: "/etc/rhodecode/conf/ca-bundle.crt" | |
145 | GIT_SSL_CAINFO: "/etc/rhodecode/conf/ca-bundle.crt" |
|
146 | GIT_SSL_CAINFO: "/etc/rhodecode/conf/ca-bundle.crt" | |
146 |
|
147 | |||
147 | # depends_on: |
|
148 | # depends_on: | |
148 | # - redis |
|
149 | # - redis | |
149 |
|
150 | |||
150 | volumes: |
|
151 | volumes: | |
151 | - confvolume:/etc/rhodecode/conf |
|
152 | - confvolume:/etc/rhodecode/conf | |
152 | - logvolume:/var/log/rhodecode |
|
153 | - logvolume:/var/log/rhodecode | |
153 | - rc_reposvolume:/var/opt/rhodecode_repo_store |
|
154 | - rc_reposvolume:/var/opt/rhodecode_repo_store | |
154 | - rc_datavolume:/var/opt/rhodecode_data |
|
155 | - rc_datavolume:/var/opt/rhodecode_data | |
155 |
|
156 | |||
156 | logging: |
|
157 | logging: | |
157 | *custom-logging |
|
158 | *custom-logging | |
158 |
|
159 | |||
159 | celery: |
|
160 | celery: | |
160 | networks: |
|
161 | networks: | |
161 | - rhodecode_network |
|
162 | - rhodecode_network | |
162 | extra_hosts: |
|
163 | extra_hosts: | |
163 | - "host.docker.internal:host-gateway" |
|
164 | - "host.docker.internal:host-gateway" | |
164 | image: rhodecode/rhodecode-${RC_EDITION}:${RC_VERSION:-4.28.0} |
|
165 | image: rhodecode/rhodecode-${RC_EDITION}:${RC_VERSION:-4.28.0} | |
165 |
|
166 | |||
166 | stdin_open: true |
|
167 | stdin_open: true | |
167 | tty: true |
|
168 | tty: true | |
168 | restart: always |
|
169 | restart: always | |
169 | env_file: |
|
170 | env_file: | |
170 | - ${RC_ENV_FILE:?must-specify-rc-env-file} |
|
171 | - ${RC_ENV_FILE:?must-specify-rc-env-file} | |
171 | command: [ |
|
172 | command: [ | |
172 | "/usr/local/bin/rhodecode_bin/bin/celery", |
|
173 | "/usr/local/bin/rhodecode_bin/bin/celery", | |
173 | "worker", |
|
174 | "worker", | |
174 | "--task-events", |
|
175 | "--task-events", | |
175 | "--autoscale=10,2", |
|
176 | "--autoscale=10,2", | |
176 | "--no-color", |
|
177 | "--no-color", | |
177 | "--app=rhodecode.lib.celerylib.loader", |
|
178 | "--app=rhodecode.lib.celerylib.loader", | |
178 | "--loglevel=DEBUG", |
|
179 | "--loglevel=DEBUG", | |
179 | "--ini=/etc/rhodecode/conf/rhodecode.ini" |
|
180 | "--ini=/etc/rhodecode/conf/rhodecode.ini" | |
180 | ] |
|
181 | ] | |
181 |
|
182 | |||
182 | environment: |
|
183 | environment: | |
183 | RC_APP_TYPE: rhodecode_celery |
|
184 | RC_APP_TYPE: rhodecode_celery | |
184 | RC_APP_PROC: 1 |
|
185 | RC_APP_PROC: 1 | |
185 | MAIN_INI_PATH: /etc/rhodecode/conf/rhodecode.ini |
|
186 | MAIN_INI_PATH: /etc/rhodecode/conf/rhodecode.ini | |
186 | SSL_CERT_FILE: "/etc/rhodecode/conf/ca-bundle.crt" |
|
187 | SSL_CERT_FILE: "/etc/rhodecode/conf/ca-bundle.crt" | |
187 | REQUESTS_CA_BUNDLE: "/etc/rhodecode/conf/ca-bundle.crt" |
|
188 | REQUESTS_CA_BUNDLE: "/etc/rhodecode/conf/ca-bundle.crt" | |
188 | GIT_SSL_CAINFO: "/etc/rhodecode/conf/ca-bundle.crt" |
|
189 | GIT_SSL_CAINFO: "/etc/rhodecode/conf/ca-bundle.crt" | |
189 |
|
190 | |||
190 | # depends_on: |
|
191 | # depends_on: | |
191 | # - database |
|
192 | # - database | |
192 | # - redis |
|
193 | # - redis | |
193 |
|
194 | |||
194 | volumes: |
|
195 | volumes: | |
195 | - confvolume:/etc/rhodecode/conf |
|
196 | - confvolume:/etc/rhodecode/conf | |
196 | - logvolume:/var/log/rhodecode |
|
197 | - logvolume:/var/log/rhodecode | |
197 | - rc_reposvolume:/var/opt/rhodecode_repo_store |
|
198 | - rc_reposvolume:/var/opt/rhodecode_repo_store | |
198 | - rc_datavolume:/var/opt/rhodecode_data |
|
199 | - rc_datavolume:/var/opt/rhodecode_data | |
199 |
|
200 | |||
200 | logging: |
|
201 | logging: | |
201 | *custom-logging |
|
202 | *custom-logging | |
202 |
|
203 | |||
203 | labels: |
|
204 | labels: | |
204 | - "traefik.enable=false" |
|
205 | - "traefik.enable=false" | |
205 |
|
206 | |||
206 | celery-beat: |
|
207 | celery-beat: | |
207 | # This service is not scalable |
|
208 | # This service is not scalable | |
208 | networks: |
|
209 | networks: | |
209 | - rhodecode_network |
|
210 | - rhodecode_network | |
210 | extra_hosts: |
|
211 | extra_hosts: | |
211 | - "host.docker.internal:host-gateway" |
|
212 | - "host.docker.internal:host-gateway" | |
212 | image: rhodecode/rhodecode-${RC_EDITION}:${RC_VERSION:-4.28.0} |
|
213 | image: rhodecode/rhodecode-${RC_EDITION}:${RC_VERSION:-4.28.0} | |
213 |
|
214 | |||
214 | stdin_open: true |
|
215 | stdin_open: true | |
215 | tty: true |
|
216 | tty: true | |
216 | restart: always |
|
217 | restart: always | |
217 | env_file: |
|
218 | env_file: | |
218 | - ${RC_ENV_FILE:?must-specify-rc-env-file} |
|
219 | - ${RC_ENV_FILE:?must-specify-rc-env-file} | |
219 | command: [ |
|
220 | command: [ | |
220 | "/usr/local/bin/rhodecode_bin/bin/celery", |
|
221 | "/usr/local/bin/rhodecode_bin/bin/celery", | |
221 | "beat", |
|
222 | "beat", | |
222 | "--no-color", |
|
223 | "--no-color", | |
223 | "--app=rhodecode.lib.celerylib.loader", |
|
224 | "--app=rhodecode.lib.celerylib.loader", | |
224 | "--scheduler=rhodecode.lib.celerylib.scheduler.RcScheduler", |
|
225 | "--scheduler=rhodecode.lib.celerylib.scheduler.RcScheduler", | |
225 | "--loglevel=DEBUG", |
|
226 | "--loglevel=DEBUG", | |
226 | "--ini=/etc/rhodecode/conf/rhodecode.ini" |
|
227 | "--ini=/etc/rhodecode/conf/rhodecode.ini" | |
227 | ] |
|
228 | ] | |
228 |
|
229 | |||
229 | environment: |
|
230 | environment: | |
230 | RC_APP_TYPE: rhodecode_beat |
|
231 | RC_APP_TYPE: rhodecode_beat | |
231 | RC_APP_PROC: 1 |
|
232 | RC_APP_PROC: 1 | |
232 | MAIN_INI_PATH: /etc/rhodecode/conf/rhodecode.ini |
|
233 | MAIN_INI_PATH: /etc/rhodecode/conf/rhodecode.ini | |
233 | SSL_CERT_FILE: "/etc/rhodecode/conf/ca-bundle.crt" |
|
234 | SSL_CERT_FILE: "/etc/rhodecode/conf/ca-bundle.crt" | |
234 | REQUESTS_CA_BUNDLE: "/etc/rhodecode/conf/ca-bundle.crt" |
|
235 | REQUESTS_CA_BUNDLE: "/etc/rhodecode/conf/ca-bundle.crt" | |
235 | GIT_SSL_CAINFO: "/etc/rhodecode/conf/ca-bundle.crt" |
|
236 | GIT_SSL_CAINFO: "/etc/rhodecode/conf/ca-bundle.crt" | |
236 |
|
237 | |||
237 | # depends_on: |
|
238 | # depends_on: | |
238 | # - database |
|
239 | # - database | |
239 | # - redis |
|
240 | # - redis | |
240 |
|
241 | |||
241 | volumes: |
|
242 | volumes: | |
242 | - confvolume:/etc/rhodecode/conf |
|
243 | - confvolume:/etc/rhodecode/conf | |
243 | - logvolume:/var/log/rhodecode |
|
244 | - logvolume:/var/log/rhodecode | |
244 | - rc_reposvolume:/var/opt/rhodecode_repo_store |
|
245 | - rc_reposvolume:/var/opt/rhodecode_repo_store | |
245 | - rc_datavolume:/var/opt/rhodecode_data |
|
246 | - rc_datavolume:/var/opt/rhodecode_data | |
246 |
|
247 | |||
247 | logging: |
|
248 | logging: | |
248 | *custom-logging |
|
249 | *custom-logging | |
249 |
|
250 | |||
250 | labels: |
|
251 | labels: | |
251 | - "traefik.enable=false" |
|
252 | - "traefik.enable=false" | |
252 |
|
253 | |||
253 | svn: |
|
254 | svn: | |
254 | networks: |
|
255 | networks: | |
255 | - rhodecode_network |
|
256 | - rhodecode_network | |
256 | extra_hosts: |
|
257 | extra_hosts: | |
257 | - "host.docker.internal:host-gateway" |
|
258 | - "host.docker.internal:host-gateway" | |
258 | image: rhodecode/rhodecode-${RC_EDITION}:${RC_VERSION:-4.28.0} |
|
259 | image: rhodecode/rhodecode-${RC_EDITION}:${RC_VERSION:-4.28.0} | |
259 |
|
260 | |||
260 | # build: |
|
261 | # build: | |
261 | # context: . |
|
262 | # context: . | |
262 | # dockerfile: service/svn/rhodecode_svn.dockerfile |
|
263 | # dockerfile: service/svn/rhodecode_svn.dockerfile | |
263 | # args: |
|
264 | # args: | |
264 | # APACHE_VER: 1.3 |
|
265 | # APACHE_VER: 1.3 | |
265 |
|
266 | |||
266 | stdin_open: true |
|
267 | stdin_open: true | |
267 | tty: true |
|
268 | tty: true | |
268 | restart: always |
|
269 | restart: always | |
269 | env_file: |
|
270 | env_file: | |
270 | - ${RC_ENV_FILE:?must-specify-rc-env-file} |
|
271 | - ${RC_ENV_FILE:?must-specify-rc-env-file} | |
271 | command: ["apachectl", "-D", "FOREGROUND"] |
|
272 | command: ["apachectl", "-D", "FOREGROUND"] | |
272 |
|
273 | |||
273 | environment: |
|
274 | environment: | |
274 | RC_APP_TYPE: rhodecode_svn |
|
275 | RC_APP_TYPE: rhodecode_svn | |
275 |
|
276 | |||
276 | # SVN Specific |
|
277 | # SVN Specific | |
277 | MOD_DAV_SVN_PORT: 8090 |
|
278 | MOD_DAV_SVN_PORT: 8090 | |
278 | APACHE_LOG_DIR: /var/log/rhodecode/svn |
|
279 | APACHE_LOG_DIR: /var/log/rhodecode/svn | |
279 | MOD_DAV_SVN_CONF_FILE: /etc/rhodecode/conf/svn/mod_dav_svn.conf |
|
280 | MOD_DAV_SVN_CONF_FILE: /etc/rhodecode/conf/svn/mod_dav_svn.conf | |
280 |
|
281 | |||
281 | # ports: |
|
282 | # ports: | |
282 | # - "127.0.0.1::8090" |
|
283 | # - "127.0.0.1::8090" | |
283 |
|
284 | |||
284 | healthcheck: |
|
285 | healthcheck: | |
285 | test: [ "CMD", "curl", "-A", "RhodeCode-Healthcheck", "-s", "-o", "/dev/null", "-w", "'%{http_code}'", "http://127.0.0.1:8090/_server_status" ] |
|
286 | test: [ "CMD", "curl", "-A", "RhodeCode-Healthcheck", "-s", "-o", "/dev/null", "-w", "'%{http_code}'", "http://127.0.0.1:8090/_server_status" ] | |
286 | timeout: 30s |
|
287 | timeout: 30s | |
287 | interval: 60s |
|
288 | interval: 60s | |
288 | retries: 10 |
|
289 | retries: 10 | |
289 |
|
290 | |||
290 | volumes: |
|
291 | volumes: | |
291 | - confvolume:/etc/rhodecode/conf |
|
292 | - confvolume:/etc/rhodecode/conf | |
292 | - logvolume:/var/log/rhodecode |
|
293 | - logvolume:/var/log/rhodecode | |
293 | - rc_reposvolume:/var/opt/rhodecode_repo_store |
|
294 | - rc_reposvolume:/var/opt/rhodecode_repo_store | |
|
295 | - rc_datavolume:/var/opt/rhodecode_data | |||
294 |
|
296 | |||
295 | logging: |
|
297 | logging: | |
296 | *custom-logging |
|
298 | *custom-logging | |
297 |
|
299 | |||
298 | sshd: |
|
300 | sshd: | |
299 | networks: |
|
301 | networks: | |
300 | - rhodecode_network |
|
302 | - rhodecode_network | |
301 | extra_hosts: |
|
303 | extra_hosts: | |
302 | - "host.docker.internal:host-gateway" |
|
304 | - "host.docker.internal:host-gateway" | |
303 | image: rhodecode/rhodecode-${RC_EDITION}:${RC_VERSION:-4.28.0} |
|
305 | image: rhodecode/rhodecode-${RC_EDITION}:${RC_VERSION:-4.28.0} | |
304 |
|
306 | |||
305 | stdin_open: true |
|
307 | stdin_open: true | |
306 | tty: true |
|
308 | tty: true | |
307 | restart: always |
|
309 | restart: always | |
308 | env_file: |
|
310 | env_file: | |
309 | - ${RC_ENV_FILE:?must-specify-rc-env-file} |
|
311 | - ${RC_ENV_FILE:?must-specify-rc-env-file} | |
310 | command: ["/usr/sbin/sshd", "-f", "/etc/rhodecode/sshd_config", "-D", "-e"] |
|
312 | command: ["/usr/sbin/sshd", "-f", "/etc/rhodecode/sshd_config", "-D", "-e"] | |
311 |
|
313 | |||
312 | environment: |
|
314 | environment: | |
313 | RC_APP_TYPE: rhodecode_sshd |
|
315 | RC_APP_TYPE: rhodecode_sshd | |
314 | SSH_BOOTSTRAP: 1 |
|
316 | SSH_BOOTSTRAP: 1 | |
315 |
|
317 | |||
316 | # ports: |
|
318 | # ports: | |
317 | # # set from .env file |
|
319 | # # set from .env file | |
318 | # - "${RC_SSH_PORT:?must-specify-ssh-port}:22" |
|
320 | # - "${RC_SSH_PORT:?must-specify-ssh-port}:22" | |
319 |
|
321 | |||
320 | volumes: |
|
322 | volumes: | |
321 | - confvolume:/etc/rhodecode/conf |
|
323 | - confvolume:/etc/rhodecode/conf | |
322 | - logvolume:/var/log/rhodecode |
|
324 | - logvolume:/var/log/rhodecode | |
323 | - rc_reposvolume:/var/opt/rhodecode_repo_store |
|
325 | - rc_reposvolume:/var/opt/rhodecode_repo_store | |
324 | - rc_datavolume:/var/opt/rhodecode_data |
|
326 | - rc_datavolume:/var/opt/rhodecode_data | |
325 |
|
327 | |||
326 | logging: |
|
328 | logging: | |
327 | *custom-logging |
|
329 | *custom-logging | |
328 |
|
330 | |||
329 | labels: |
|
331 | labels: | |
330 | - "traefik.enable=true" |
|
332 | - "traefik.enable=true" | |
331 | - "traefik.http.routers.sshd.entrypoints=ssh" |
|
333 | - "traefik.http.routers.sshd.entrypoints=ssh" | |
332 | - "traefik.http.routers.sshd.rule=Host(`*`)" |
|
334 | - "traefik.http.routers.sshd.rule=Host(`*`)" | |
333 | - "traefik.http.routers.sshd.service=rhodecode-ssh" |
|
335 | - "traefik.http.routers.sshd.service=rhodecode-ssh" | |
334 | - "traefik.http.services.rhodecode-ssh.loadbalancer.server.port=${RC_SSH_PORT:?must-specify-ssh-port}" |
|
336 | - "traefik.http.services.rhodecode-ssh.loadbalancer.server.port=${RC_SSH_PORT:?must-specify-ssh-port}" |
@@ -1,54 +1,55 b'' | |||||
1 | version: '3.9' |
|
1 | version: '3.9' | |
2 |
|
2 | |||
3 | ## Shared base stuff for all compose files in stack |
|
3 | ## Shared base stuff for all compose files in stack | |
4 |
|
4 | |||
5 | x-logging: &custom-logging |
|
5 | x-logging: &custom-logging | |
6 | # Install loki plugin |
|
6 | # Install loki plugin | |
7 | # docker plugin install grafana/loki-docker-driver:2.7.1 --alias loki --grant-all-permissions |
|
7 | # docker plugin install grafana/loki-docker-driver:2.7.1 --alias loki --grant-all-permissions | |
8 | # NOTE: loki logging driver ONLY works for host type networks... |
|
8 | # NOTE: loki logging driver ONLY works for host type networks... | |
9 | # To cleanly uninstall the plugin, disable and remove it |
|
9 | # To cleanly uninstall the plugin, disable and remove it | |
10 | # docker plugin disable loki --force && docker plugin rm loki |
|
10 | # docker plugin disable loki --force && docker plugin rm loki | |
11 | # debug: sudo journalctl -u docker.service | grep loki |
|
11 | # debug: sudo journalctl -u docker.service | grep loki | |
12 | driver: loki |
|
12 | driver: loki | |
13 | options: |
|
13 | options: | |
14 | loki-url: "http://loki:3100/loki/api/v1/push" |
|
14 | #loki-url: "http://loki:3100/loki/api/v1/push" | |
|
15 | loki-url: "http://127.0.0.1:3100/loki/api/v1/push" | |||
15 | loki-retries: "5" |
|
16 | loki-retries: "5" | |
16 | loki-timeout: "1s" |
|
17 | loki-timeout: "1s" | |
17 | loki-max-backoff: "800ms" |
|
18 | loki-max-backoff: "800ms" | |
18 |
|
19 | |||
19 | volumes: |
|
20 | volumes: | |
20 | # shared logvolume |
|
21 | # shared logvolume | |
21 | logvolume: |
|
22 | logvolume: | |
22 | driver: local |
|
23 | driver: local | |
23 | driver_opts: |
|
24 | driver_opts: | |
24 | type: none |
|
25 | type: none | |
25 | o: bind |
|
26 | o: bind | |
26 | device: $PWD/logs |
|
27 | device: $PWD/logs | |
27 |
|
28 | |||
28 | # bind-mount with configs |
|
29 | # bind-mount with configs | |
29 | confvolume: |
|
30 | confvolume: | |
30 | driver: local |
|
31 | driver: local | |
31 | driver_opts: |
|
32 | driver_opts: | |
32 | type: none |
|
33 | type: none | |
33 | o: bind |
|
34 | o: bind | |
34 | device: $PWD/config/_shared |
|
35 | device: $PWD/config/_shared | |
35 |
|
36 | |||
36 | # SHARED volume for rhodecode caches, archive caches, nginx static, |
|
37 | # SHARED volume for rhodecode caches, archive caches, nginx static, | |
37 | # must be run via: docker volume create --name=rc_datavolume |
|
38 | # must be run via: docker volume create --name=rc_datavolume | |
38 | rc_datavolume: |
|
39 | rc_datavolume: | |
39 | external: true |
|
40 | external: true | |
40 |
|
41 | |||
41 | # volume for RhodeCode repo-store, it's where the repositories will be stored |
|
42 | # volume for RhodeCode repo-store, it's where the repositories will be stored | |
42 | # must be run via: docker volume create --name=rc_reposvolume |
|
43 | # must be run via: docker volume create --name=rc_reposvolume | |
43 | rc_reposvolume: |
|
44 | rc_reposvolume: | |
44 | external: true |
|
45 | external: true | |
45 |
|
46 | |||
46 | networks: |
|
47 | networks: | |
47 |
|
48 | |||
48 | # SHARED network for all containers |
|
49 | # SHARED network for all containers | |
49 | # must be run via: docker network create --name=rhodecode_network |
|
50 | # must be run via: docker network create --name=rhodecode_network | |
50 | rhodecode_network: |
|
51 | rhodecode_network: | |
51 | name: rhodecode_network |
|
52 | name: rhodecode_network | |
52 | driver: bridge |
|
53 | driver: bridge | |
53 | external: true |
|
54 | external: true | |
54 |
|
55 |
@@ -1,129 +1,131 b'' | |||||
1 | version: '3.9' |
|
1 | version: '3.9' | |
2 |
|
2 | |||
3 | volumes: |
|
3 | volumes: | |
4 |
|
4 | |||
5 | prometheus_data: |
|
5 | prometheus_data: | |
6 | labels: |
|
6 | labels: | |
7 | "keep": 1 |
|
7 | "keep": 1 | |
8 |
|
8 | |||
9 | grafana_data: |
|
9 | grafana_data: | |
10 | labels: |
|
10 | labels: | |
11 | "keep": 1 |
|
11 | "keep": 1 | |
12 |
|
12 | |||
13 | services: |
|
13 | services: | |
14 |
|
14 | |||
15 | statsd-exporter: |
|
15 | statsd-exporter: | |
16 | image: prom/statsd-exporter:v0.22.8 |
|
16 | image: prom/statsd-exporter:v0.22.8 | |
17 | restart: always |
|
17 | restart: always | |
18 | command: [ |
|
18 | command: [ | |
19 | '--statsd.mapping-config=/etc/statsd/statsd.yaml', |
|
19 | '--statsd.mapping-config=/etc/statsd/statsd.yaml', | |
20 | '--statsd.listen-udp=:9125', |
|
20 | '--statsd.listen-udp=:9125', | |
21 | '--web.listen-address=:9102' |
|
21 | '--web.listen-address=:9102' | |
22 | ] |
|
22 | ] | |
23 | networks: |
|
23 | networks: | |
24 | - rhodecode_network |
|
24 | - rhodecode_network | |
25 | # ports: |
|
25 | # ports: | |
26 | # - "9125:9125/udp" |
|
26 | # - "9125:9125/udp" | |
27 | # - "9102:9102" |
|
27 | # - "9102:9102" | |
28 |
|
28 | |||
29 | volumes: |
|
29 | volumes: | |
30 | - ./config/statsd-exporter:/etc/statsd |
|
30 | - ./config/statsd-exporter:/etc/statsd | |
31 | labels: |
|
31 | labels: | |
32 | - "traefik.enable=false" |
|
32 | - "traefik.enable=false" | |
33 | - "traefik.http.services.statsd-exporter.loadbalancer.server.port=9125" |
|
33 | - "traefik.http.services.statsd-exporter.loadbalancer.server.port=9125" | |
34 | - "traefik.http.services.statsd-exporter.loadbalancer.server.port=9102" |
|
34 | - "traefik.http.services.statsd-exporter.loadbalancer.server.port=9102" | |
35 |
|
35 | |||
36 | node-exporter: |
|
36 | node-exporter: | |
37 | image: prom/node-exporter:v1.4.1 |
|
37 | image: prom/node-exporter:v1.4.1 | |
38 | command: |
|
38 | command: | |
39 | - "--path.procfs=/host/proc" |
|
39 | - "--path.procfs=/host/proc" | |
40 | - "--path.rootfs=/rootfs" |
|
40 | - "--path.rootfs=/rootfs" | |
41 | - "--path.sysfs=/host/sys" |
|
41 | - "--path.sysfs=/host/sys" | |
42 | - "--collector.filesystem.mount-points-exclude=^/(sys|proc|dev|host|etc)($$|/)" |
|
42 | - "--collector.filesystem.mount-points-exclude=^/(sys|proc|dev|host|etc)($$|/)" | |
43 | - "--collector.systemd" |
|
43 | - "--collector.systemd" | |
44 | - "--collector.processes" |
|
44 | - "--collector.processes" | |
45 | networks: |
|
45 | networks: | |
46 | - rhodecode_network |
|
46 | - rhodecode_network | |
47 | pid: host |
|
47 | pid: host | |
48 | restart: always |
|
48 | restart: always | |
49 | # ports: |
|
49 | # ports: | |
50 | # - "9100:9100" |
|
50 | # - "9100:9100" | |
51 | volumes: |
|
51 | volumes: | |
52 | - "/proc:/host/proc:ro" |
|
52 | - "/proc:/host/proc:ro" | |
53 | - "/sys:/host/sys:ro" |
|
53 | - "/sys:/host/sys:ro" | |
54 | - "/:/rootfs:ro" |
|
54 | - "/:/rootfs:ro" | |
55 | labels: |
|
55 | labels: | |
56 | - "traefik.enable=false" |
|
56 | - "traefik.enable=false" | |
57 | - "traefik.http.services.node-exporter.loadbalancer.server.port=9100" |
|
57 | - "traefik.http.services.node-exporter.loadbalancer.server.port=9100" | |
58 |
|
58 | |||
59 | prometheus: |
|
59 | prometheus: | |
60 | image: prom/prometheus:v2.40.6 |
|
60 | image: prom/prometheus:v2.40.6 | |
61 | restart: always |
|
61 | restart: always | |
62 | command: |
|
62 | command: | |
63 | - "--config.file=/etc/prometheus/prometheus.yml" |
|
63 | - "--config.file=/etc/prometheus/prometheus.yml" | |
64 | - "--storage.tsdb.path=/prometheus" |
|
64 | - "--storage.tsdb.path=/prometheus" | |
65 | - "--web.console.libraries=/etc/prometheus/console_libraries" |
|
65 | - "--web.console.libraries=/etc/prometheus/console_libraries" | |
66 | - "--web.console.templates=/etc/prometheus/consoles" |
|
66 | - "--web.console.templates=/etc/prometheus/consoles" | |
67 | - "--storage.tsdb.retention.time=24h" |
|
67 | - "--storage.tsdb.retention.time=24h" | |
68 | - "--web.enable-lifecycle" |
|
68 | - "--web.enable-lifecycle" | |
69 | # ports: |
|
69 | # ports: | |
70 | # - "9090:9090" |
|
70 | # - "9090:9090" | |
71 | networks: |
|
71 | networks: | |
72 | - rhodecode_network |
|
72 | - rhodecode_network | |
73 | volumes: |
|
73 | volumes: | |
74 | - ./config/prometheus:/etc/prometheus |
|
74 | - ./config/prometheus:/etc/prometheus | |
75 | - prometheus_data:/prometheus |
|
75 | - prometheus_data:/prometheus | |
76 | labels: |
|
76 | labels: | |
77 | - "traefik.enable=false" |
|
77 | - "traefik.enable=false" | |
78 | - "traefik.http.services.prometheus.loadbalancer.server.port=9090" |
|
78 | - "traefik.http.services.prometheus.loadbalancer.server.port=9090" | |
79 |
|
79 | |||
80 | grafana: |
|
80 | grafana: | |
81 | image: grafana/grafana:9.3.1 |
|
81 | image: grafana/grafana:9.3.1 | |
82 | restart: always |
|
82 | restart: always | |
83 | # ports: |
|
83 | # ports: | |
84 | # - "3000:3000" |
|
84 | # - "3000:3000" | |
85 | volumes: |
|
85 | volumes: | |
86 | - grafana_data:/var/lib/grafana |
|
86 | - grafana_data:/var/lib/grafana | |
87 | - ./config/grafana:/etc/grafana |
|
87 | - ./config/grafana:/etc/grafana | |
88 | networks: |
|
88 | networks: | |
89 | - rhodecode_network |
|
89 | - rhodecode_network | |
90 | labels: |
|
90 | labels: | |
91 | - "traefik.enable=true" |
|
91 | - "traefik.enable=true" | |
92 | - "traefik.http.routers.grafana.entrypoints=http" |
|
92 | - "traefik.http.routers.grafana.entrypoints=http" | |
93 | - "traefik.http.routers.grafana.rule=PathPrefix(`/_grafana`)" |
|
93 | - "traefik.http.routers.grafana.rule=PathPrefix(`/_grafana`)" | |
94 | - "traefik.http.routers.grafana.service=grafana-http" |
|
94 | - "traefik.http.routers.grafana.service=grafana-http" | |
95 | - "traefik.http.services.grafana-http.loadbalancer.server.port=3000" |
|
95 | - "traefik.http.services.grafana-http.loadbalancer.server.port=3000" | |
96 | # SSL + proxy prefix example, should be put into .custom/docker-compose-metrics.override.yaml |
|
96 | # SSL + proxy prefix example, should be put into .custom/docker-compose-metrics.override.yaml | |
97 | #- "traefik.http.routers.grafana-rt.entrypoints=https" |
|
97 | #- "traefik.http.routers.grafana-rt.entrypoints=https" | |
98 | #- "traefik.http.routers.grafana-rt.rule=Host(`metrics.example.com`) && PathPrefix(`/_grafana`)" |
|
98 | #- "traefik.http.routers.grafana-rt.rule=Host(`metrics.example.com`) && PathPrefix(`/_grafana`)" | |
99 | #- "traefik.http.routers.grafana-rt.tls=true" |
|
99 | #- "traefik.http.routers.grafana-rt.tls=true" | |
100 | #- "traefik.http.routers.grafana-rt.service=grafana-ssl" |
|
100 | #- "traefik.http.routers.grafana-rt.service=grafana-ssl" | |
101 | #- "traefik.http.services.grafana-ssl.loadbalancer.server.port=3000" |
|
101 | #- "traefik.http.services.grafana-ssl.loadbalancer.server.port=3000" | |
102 |
|
102 | |||
103 | loki: |
|
103 | loki: | |
104 | image: grafana/loki:2.7.1 |
|
104 | image: grafana/loki:2.7.1 | |
105 | restart: always |
|
105 | restart: always | |
106 |
|
|
106 | ports: | |
107 | # - "3100:3100" |
|
107 | # Loki port is the only one that needs explicitly | |
|
108 | # be exposed because of logging driver host-only woking mode | |||
|
109 | - "3100:3100" | |||
108 | # - "9095:9095" |
|
110 | # - "9095:9095" | |
109 | command: [ |
|
111 | command: [ | |
110 | "-config.file=/etc/loki/loki-config.yaml" |
|
112 | "-config.file=/etc/loki/loki-config.yaml" | |
111 | ] |
|
113 | ] | |
112 | networks: |
|
114 | networks: | |
113 | - rhodecode_network |
|
115 | - rhodecode_network | |
114 | volumes: |
|
116 | volumes: | |
115 | - ./config/loki:/etc/loki |
|
117 | - ./config/loki:/etc/loki | |
116 |
|
118 | |||
117 | promtail: |
|
119 | promtail: | |
118 | image: grafana/promtail:2.7.1 |
|
120 | image: grafana/promtail:2.7.1 | |
119 | command: [ |
|
121 | command: [ | |
120 | "-config.file=/etc/promtail/promtail-config.yaml" |
|
122 | "-config.file=/etc/promtail/promtail-config.yaml" | |
121 | ] |
|
123 | ] | |
122 | networks: |
|
124 | networks: | |
123 | - rhodecode_network |
|
125 | - rhodecode_network | |
124 | volumes: |
|
126 | volumes: | |
125 | - /var/log:/var/log |
|
127 | - /var/log:/var/log | |
126 | - logvolume:/var/log_volume |
|
128 | - logvolume:/var/log_volume | |
127 | - ./config/promtail:/etc/promtail |
|
129 | - ./config/promtail:/etc/promtail | |
128 | labels: |
|
130 | labels: | |
129 | - "traefik.enable=false" |
|
131 | - "traefik.enable=false" |
@@ -1,43 +1,44 b'' | |||||
1 | version: '3.9' |
|
1 | version: '3.9' | |
2 |
|
2 | |||
3 | x-logging: &custom-logging |
|
3 | x-logging: &custom-logging | |
4 | # docker plugin install grafana/loki-docker-driver:2.7.1 --alias loki --grant-all-permissions |
|
4 | # docker plugin install grafana/loki-docker-driver:2.7.1 --alias loki --grant-all-permissions | |
5 | # NOTE: loki logging driver ONLY works for host type networks... |
|
5 | # NOTE: loki logging driver ONLY works for host type networks... | |
6 | driver: loki |
|
6 | driver: loki | |
7 | options: |
|
7 | options: | |
8 | loki-url: "http://loki:3100/loki/api/v1/push" |
|
8 | #loki-url: "http://loki:3100/loki/api/v1/push" | |
|
9 | loki-url: "http://127.0.0.1:3100/loki/api/v1/push" | |||
9 | loki-retries: "5" |
|
10 | loki-retries: "5" | |
10 | loki-timeout: "1s" |
|
11 | loki-timeout: "1s" | |
11 | loki-max-backoff: "800ms" |
|
12 | loki-max-backoff: "800ms" | |
12 |
|
13 | |||
13 | ## docker network create -d overlay lb-net |
|
14 | ## docker network create -d overlay lb-net | |
14 | services: |
|
15 | services: | |
15 |
|
16 | |||
16 | traefik: |
|
17 | traefik: | |
17 |
|
18 | |||
18 | image: traefik:v2.9.6 |
|
19 | image: traefik:v2.9.6 | |
19 |
|
20 | |||
20 | ports: |
|
21 | ports: | |
21 | # The HTTP port, exposed as http entrypoint |
|
22 | # The HTTP port, exposed as http entrypoint | |
22 | - "80:80" |
|
23 | - "80:80" | |
23 | # The HTTPS port, exposed as https entrypoint |
|
24 | # The HTTPS port, exposed as https entrypoint | |
24 | - "443:443" |
|
25 | - "443:443" | |
25 | # The SSH port |
|
26 | # The SSH port | |
26 | - "${RC_SSH_PORT}:${RC_SSH_PORT}" |
|
27 | - "${RC_SSH_PORT}:${RC_SSH_PORT}" | |
27 | volumes: |
|
28 | volumes: | |
28 | # So that Traefik can listen to the Docker events |
|
29 | # So that Traefik can listen to the Docker events | |
29 | - /var/run/docker.sock:/var/run/docker.sock |
|
30 | - /var/run/docker.sock:/var/run/docker.sock | |
30 | - ./config/traefik:/etc/traefik |
|
31 | - ./config/traefik:/etc/traefik | |
31 | deploy: |
|
32 | deploy: | |
32 | placement: |
|
33 | placement: | |
33 | constraints: |
|
34 | constraints: | |
34 | # limit swarm deploy to MANAGER only |
|
35 | # limit swarm deploy to MANAGER only | |
35 | - node.role == manager |
|
36 | - node.role == manager | |
36 | networks: |
|
37 | networks: | |
37 | - rhodecode_network |
|
38 | - rhodecode_network | |
38 |
|
39 | |||
39 | labels: |
|
40 | labels: | |
40 | - "traefik.enable=true" |
|
41 | - "traefik.enable=true" | |
41 |
|
42 | |||
42 | logging: |
|
43 | logging: | |
43 | *custom-logging |
|
44 | *custom-logging |
@@ -1,247 +1,248 b'' | |||||
1 | version: '3.9' |
|
1 | version: '3.9' | |
2 |
|
2 | |||
3 | x-logging: &custom-logging |
|
3 | x-logging: &custom-logging | |
4 | # docker plugin install grafana/loki-docker-driver:2.7.1 --alias loki --grant-all-permissions |
|
4 | # docker plugin install grafana/loki-docker-driver:2.7.1 --alias loki --grant-all-permissions | |
5 | # NOTE: loki logging driver ONLY works for host type networks... |
|
5 | # NOTE: loki logging driver ONLY works for host type networks... | |
6 | driver: loki |
|
6 | driver: loki | |
7 | options: |
|
7 | options: | |
8 | loki-url: "http://loki:3100/loki/api/v1/push" |
|
8 | #loki-url: "http://loki:3100/loki/api/v1/push" | |
|
9 | loki-url: "http://127.0.0.1:3100/loki/api/v1/push" | |||
9 | loki-retries: "5" |
|
10 | loki-retries: "5" | |
10 | loki-timeout: "1s" |
|
11 | loki-timeout: "1s" | |
11 | loki-max-backoff: "800ms" |
|
12 | loki-max-backoff: "800ms" | |
12 |
|
13 | |||
13 | volumes: |
|
14 | volumes: | |
14 |
|
15 | |||
15 | # volume for redis data store |
|
16 | # volume for redis data store | |
16 | redis_data: |
|
17 | redis_data: | |
17 | labels: |
|
18 | labels: | |
18 | "keep": 1 |
|
19 | "keep": 1 | |
19 |
|
20 | |||
20 | # volume for Postgres db store |
|
21 | # volume for Postgres db store | |
21 |
|
22 | |||
22 | # volume for Postgres Data |
|
23 | # volume for Postgres Data | |
23 | pg_data: |
|
24 | pg_data: | |
24 | labels: |
|
25 | labels: | |
25 | "keep": 1 |
|
26 | "keep": 1 | |
26 |
|
27 | |||
27 | # volume for rhodecode elasticsearch |
|
28 | # volume for rhodecode elasticsearch | |
28 | es_data: |
|
29 | es_data: | |
29 | labels: |
|
30 | labels: | |
30 | "keep": 1 |
|
31 | "keep": 1 | |
31 |
|
32 | |||
32 |
|
33 | |||
33 | services: |
|
34 | services: | |
34 |
|
35 | |||
35 | channelstream: |
|
36 | channelstream: | |
36 | networks: |
|
37 | networks: | |
37 | - rhodecode_network |
|
38 | - rhodecode_network | |
38 | image: channelstream/channelstream:0.7.1 |
|
39 | image: channelstream/channelstream:0.7.1 | |
39 |
|
40 | |||
40 | restart: always |
|
41 | restart: always | |
41 |
|
42 | |||
42 | # ports: |
|
43 | # ports: | |
43 | # - "127.0.0.1:9800:9800" |
|
44 | # - "127.0.0.1:9800:9800" | |
44 | env_file: |
|
45 | env_file: | |
45 | - ${RC_ENV_FILE:?must-specify-rc-env-file} |
|
46 | - ${RC_ENV_FILE:?must-specify-rc-env-file} | |
46 | command: ["channelstream"] |
|
47 | command: ["channelstream"] | |
47 |
|
48 | |||
48 | healthcheck: |
|
49 | healthcheck: | |
49 | test: [ "CMD", "curl", "-s", "-o", "/dev/null", "-w", "'%{http_code}'", "http://channelstream:8000/admin/sign_in" ] |
|
50 | test: [ "CMD", "curl", "-s", "-o", "/dev/null", "-w", "'%{http_code}'", "http://channelstream:8000/admin/sign_in" ] | |
50 | timeout: 5s |
|
51 | timeout: 5s | |
51 | interval: 60s |
|
52 | interval: 60s | |
52 | retries: 10 |
|
53 | retries: 10 | |
53 |
|
54 | |||
54 | volumes: |
|
55 | volumes: | |
55 | - confvolume:/etc/rhodecode/conf |
|
56 | - confvolume:/etc/rhodecode/conf | |
56 | - logvolume:/var/log/rhodecode |
|
57 | - logvolume:/var/log/rhodecode | |
57 |
|
58 | |||
58 | logging: |
|
59 | logging: | |
59 | *custom-logging |
|
60 | *custom-logging | |
60 |
|
61 | |||
61 | labels: |
|
62 | labels: | |
62 | - "traefik.enable=false" |
|
63 | - "traefik.enable=false" | |
63 | #- "traefik.http.routers.channelstream.entrypoints=http" |
|
64 | #- "traefik.http.routers.channelstream.entrypoints=http" | |
64 | #- "traefik.http.services.channelstream.loadbalancer.server.port=9800" |
|
65 | #- "traefik.http.services.channelstream.loadbalancer.server.port=9800" | |
65 |
|
66 | |||
66 | profiles: |
|
67 | profiles: | |
67 | ["channelstream"] |
|
68 | ["channelstream"] | |
68 |
|
69 | |||
69 | nginx: |
|
70 | nginx: | |
70 | networks: |
|
71 | networks: | |
71 | - rhodecode_network |
|
72 | - rhodecode_network | |
72 | image: library/nginx:1.23.2 |
|
73 | image: library/nginx:1.23.2 | |
73 |
|
74 | |||
74 | restart: always |
|
75 | restart: always | |
75 |
|
76 | |||
76 | environment: |
|
77 | environment: | |
77 | NGINX_ENTRYPOINT_QUIET_LOGS: 1 |
|
78 | NGINX_ENTRYPOINT_QUIET_LOGS: 1 | |
78 | env_file: |
|
79 | env_file: | |
79 | - ${RC_ENV_FILE:?must-specify-rc-env-file} |
|
80 | - ${RC_ENV_FILE:?must-specify-rc-env-file} | |
80 |
|
81 | |||
81 | healthcheck: |
|
82 | healthcheck: | |
82 | # change port 80 to 443 when only using SSL |
|
83 | # change port 80 to 443 when only using SSL | |
83 | test: [ "CMD", "curl", "-A", "RhodeCode-Healthcheck", "-s", "-o", "/dev/null", "-w", "'%{http_code}'", "http://127.0.0.1:80/_health" ] |
|
84 | test: [ "CMD", "curl", "-A", "RhodeCode-Healthcheck", "-s", "-o", "/dev/null", "-w", "'%{http_code}'", "http://127.0.0.1:80/_health" ] | |
84 | timeout: 30s |
|
85 | timeout: 30s | |
85 | interval: 60s |
|
86 | interval: 60s | |
86 | retries: 10 |
|
87 | retries: 10 | |
87 |
|
88 | |||
88 | # depends_on: |
|
89 | # depends_on: | |
89 | # - channelstream |
|
90 | # - channelstream | |
90 |
|
91 | |||
91 | volumes: |
|
92 | volumes: | |
92 | - ./config/nginx/nginx.conf:/etc/nginx/nginx.conf:ro |
|
93 | - ./config/nginx/nginx.conf:/etc/nginx/nginx.conf:ro | |
93 | - ./config/nginx/http.conf:/etc/nginx/http.conf:ro |
|
94 | - ./config/nginx/http.conf:/etc/nginx/http.conf:ro | |
94 | - ./config/nginx/proxy.conf:/etc/nginx/proxy.conf:ro |
|
95 | - ./config/nginx/proxy.conf:/etc/nginx/proxy.conf:ro | |
95 | - logvolume:/var/log/rhodecode |
|
96 | - logvolume:/var/log/rhodecode | |
96 | - rc_datavolume:/var/opt/rhodecode_data |
|
97 | - rc_datavolume:/var/opt/rhodecode_data | |
97 |
|
98 | |||
98 | logging: |
|
99 | logging: | |
99 | *custom-logging |
|
100 | *custom-logging | |
100 |
|
101 | |||
101 | labels: |
|
102 | labels: | |
102 | - "traefik.enable=true" |
|
103 | - "traefik.enable=true" | |
103 | - "traefik.http.routers.nginx.entrypoints=http" |
|
104 | - "traefik.http.routers.nginx.entrypoints=http" | |
104 | - "traefik.http.routers.nginx.rule=Host(`${RC_HOSTNAME:?must-specify-rhodecode-hostname}`) && ( PathPrefix(`/_health`) || PathPrefix(`/_channelstream`) || PathPrefix(`/_static/rhodecode`) )" |
|
105 | - "traefik.http.routers.nginx.rule=Host(`${RC_HOSTNAME:?must-specify-rhodecode-hostname}`) && ( PathPrefix(`/_health`) || PathPrefix(`/_channelstream`) || PathPrefix(`/_static/rhodecode`) )" | |
105 | - "traefik.http.services.nginx.loadbalancer.server.port=80" |
|
106 | - "traefik.http.services.nginx.loadbalancer.server.port=80" | |
106 |
|
107 | |||
107 | elasticsearch: |
|
108 | elasticsearch: | |
108 | networks: |
|
109 | networks: | |
109 | - rhodecode_network |
|
110 | - rhodecode_network | |
110 | image: elasticsearch:6.8.23 |
|
111 | image: elasticsearch:6.8.23 | |
111 |
|
112 | |||
112 | environment: |
|
113 | environment: | |
113 | - cluster.name=elasticsearch-cluster |
|
114 | - cluster.name=elasticsearch-cluster | |
114 | - network.host=0.0.0.0 |
|
115 | - network.host=0.0.0.0 | |
115 | - bootstrap.memory_lock=true |
|
116 | - bootstrap.memory_lock=true | |
116 | - discovery.type=single-node |
|
117 | - discovery.type=single-node | |
117 | - "ES_JAVA_OPTS=-Xms512m -Xmx512m" |
|
118 | - "ES_JAVA_OPTS=-Xms512m -Xmx512m" | |
118 | env_file: |
|
119 | env_file: | |
119 | - ${RC_ENV_FILE:?must-specify-rc-env-file} |
|
120 | - ${RC_ENV_FILE:?must-specify-rc-env-file} | |
120 | healthcheck: |
|
121 | healthcheck: | |
121 | # change port 80 to 443 when only using SSL |
|
122 | # change port 80 to 443 when only using SSL | |
122 | test: [ "CMD", "curl", "-A", "RhodeCode-Healthcheck", "-s", "-o", "/dev/null", "-w", "'%{http_code}'", "elasticsearch:9200/_cat/health" ] |
|
123 | test: [ "CMD", "curl", "-A", "RhodeCode-Healthcheck", "-s", "-o", "/dev/null", "-w", "'%{http_code}'", "elasticsearch:9200/_cat/health" ] | |
123 | timeout: 30s |
|
124 | timeout: 30s | |
124 | interval: 60s |
|
125 | interval: 60s | |
125 | retries: 10 |
|
126 | retries: 10 | |
126 |
|
127 | |||
127 | ulimits: |
|
128 | ulimits: | |
128 | memlock: |
|
129 | memlock: | |
129 | soft: -1 |
|
130 | soft: -1 | |
130 | hard: -1 |
|
131 | hard: -1 | |
131 |
|
132 | |||
132 | volumes: |
|
133 | volumes: | |
133 | - es_data:/usr/share/elasticsearch/data |
|
134 | - es_data:/usr/share/elasticsearch/data | |
134 |
|
135 | |||
135 | logging: |
|
136 | logging: | |
136 | *custom-logging |
|
137 | *custom-logging | |
137 |
|
138 | |||
138 | profiles: |
|
139 | profiles: | |
139 | ["elasticsearch"] |
|
140 | ["elasticsearch"] | |
140 |
|
141 | |||
141 | redis: |
|
142 | redis: | |
142 | networks: |
|
143 | networks: | |
143 | - rhodecode_network |
|
144 | - rhodecode_network | |
144 | image: library/redis:7.0.5 |
|
145 | image: library/redis:7.0.5 | |
145 |
|
146 | |||
146 | restart: always |
|
147 | restart: always | |
147 | env_file: |
|
148 | env_file: | |
148 | - ${RC_ENV_FILE:?must-specify-rc-env-file} |
|
149 | - ${RC_ENV_FILE:?must-specify-rc-env-file} | |
149 | command: |
|
150 | command: | |
150 | - "redis-server" |
|
151 | - "redis-server" | |
151 | - "/etc/redis/redis.conf" |
|
152 | - "/etc/redis/redis.conf" | |
152 | - "--maxmemory-policy allkeys-lru" |
|
153 | - "--maxmemory-policy allkeys-lru" | |
153 | - "--maxmemory ${RC_REDIS_MAXMEMORY:?must-specify-redis-maxmemory}" |
|
154 | - "--maxmemory ${RC_REDIS_MAXMEMORY:?must-specify-redis-maxmemory}" | |
154 |
|
155 | |||
155 | # ports: |
|
156 | # ports: | |
156 | # - "127.0.0.1::6379" |
|
157 | # - "127.0.0.1::6379" | |
157 |
|
158 | |||
158 | healthcheck: |
|
159 | healthcheck: | |
159 | test: [ "CMD", "redis-cli", "--raw", "incr", "ping" ] |
|
160 | test: [ "CMD", "redis-cli", "--raw", "incr", "ping" ] | |
160 | interval: 60s |
|
161 | interval: 60s | |
161 |
|
162 | |||
162 | volumes: |
|
163 | volumes: | |
163 | - ./config/redis/redis.conf:/etc/redis/redis.conf:ro |
|
164 | - ./config/redis/redis.conf:/etc/redis/redis.conf:ro | |
164 | - logvolume:/var/log/rhodecode |
|
165 | - logvolume:/var/log/rhodecode | |
165 | - redis_data:/data |
|
166 | - redis_data:/data | |
166 |
|
167 | |||
167 | profiles: |
|
168 | profiles: | |
168 | ["redis"] |
|
169 | ["redis"] | |
169 |
|
170 | |||
170 | logging: |
|
171 | logging: | |
171 | *custom-logging |
|
172 | *custom-logging | |
172 |
|
173 | |||
173 | database: |
|
174 | database: | |
174 | networks: |
|
175 | networks: | |
175 | - rhodecode_network |
|
176 | - rhodecode_network | |
176 | image: library/postgres:14.6 |
|
177 | image: library/postgres:14.6 | |
177 |
|
178 | |||
178 | environment: |
|
179 | environment: | |
179 | POSTGRES_DB: ${DB_NAME:?must-specify-db-name} |
|
180 | POSTGRES_DB: ${DB_NAME:?must-specify-db-name} | |
180 | POSTGRES_USER: ${DB_USER:?must-specify-db-user} |
|
181 | POSTGRES_USER: ${DB_USER:?must-specify-db-user} | |
181 | PGUSER: ${DB_USER:?must-specify-db-user} |
|
182 | PGUSER: ${DB_USER:?must-specify-db-user} | |
182 | POSTGRES_PASSWORD: ${DB_PASSWORD:?must-specify-db-password} |
|
183 | POSTGRES_PASSWORD: ${DB_PASSWORD:?must-specify-db-password} | |
183 | POSTGRES_HOST_AUTH_METHOD: md5 |
|
184 | POSTGRES_HOST_AUTH_METHOD: md5 | |
184 | POSTGRES_INITDB_ARGS: "--auth-host=md5 --auth-local=md5" |
|
185 | POSTGRES_INITDB_ARGS: "--auth-host=md5 --auth-local=md5" | |
185 | env_file: |
|
186 | env_file: | |
186 | - ${RC_ENV_FILE:?must-specify-rc-env-file} |
|
187 | - ${RC_ENV_FILE:?must-specify-rc-env-file} | |
187 |
|
188 | |||
188 | restart: always |
|
189 | restart: always | |
189 | command: |
|
190 | command: | |
190 | - "postgres" |
|
191 | - "postgres" | |
191 | - "-c" |
|
192 | - "-c" | |
192 | - "log_statement=ddl" |
|
193 | - "log_statement=ddl" | |
193 | - "-c" |
|
194 | - "-c" | |
194 | - "config_file=/etc/conf.d/pg_customized.conf" |
|
195 | - "config_file=/etc/conf.d/pg_customized.conf" | |
195 |
|
196 | |||
196 | # ports: |
|
197 | # ports: | |
197 | # - "127.0.0.1::5432" |
|
198 | # - "127.0.0.1::5432" | |
198 |
|
199 | |||
199 | healthcheck: |
|
200 | healthcheck: | |
200 | test: ["CMD-SHELL", "pg_isready", '-U', "$DB_USER"] |
|
201 | test: ["CMD-SHELL", "pg_isready", '-U', "$DB_USER"] | |
201 | interval: 10s |
|
202 | interval: 10s | |
202 | timeout: 5s |
|
203 | timeout: 5s | |
203 | retries: 5 |
|
204 | retries: 5 | |
204 |
|
205 | |||
205 | volumes: |
|
206 | volumes: | |
206 | - $PWD/config/database/pg_customized.conf:/etc/conf.d/pg_customized.conf:ro |
|
207 | - $PWD/config/database/pg_customized.conf:/etc/conf.d/pg_customized.conf:ro | |
207 | # db dumps reverse mount |
|
208 | # db dumps reverse mount | |
208 | - $PWD/.custom/db_dump:/var/rc-data-dump |
|
209 | - $PWD/.custom/db_dump:/var/rc-data-dump | |
209 | # save the pg_data volume |
|
210 | # save the pg_data volume | |
210 | - pg_data:/var/lib/postgresql/data |
|
211 | - pg_data:/var/lib/postgresql/data | |
211 | - logvolume:/var/log/rhodecode |
|
212 | - logvolume:/var/log/rhodecode | |
212 |
|
213 | |||
213 | profiles: |
|
214 | profiles: | |
214 | ["postgres"] |
|
215 | ["postgres"] | |
215 |
|
216 | |||
216 | logging: |
|
217 | logging: | |
217 | *custom-logging |
|
218 | *custom-logging | |
218 |
|
219 | |||
219 | database-mysql: |
|
220 | database-mysql: | |
220 | networks: |
|
221 | networks: | |
221 | - rhodecode_network |
|
222 | - rhodecode_network | |
222 | image: library/mysql:8.0.31 |
|
223 | image: library/mysql:8.0.31 | |
223 |
|
224 | |||
224 | environment: |
|
225 | environment: | |
225 | MYSQL_DATABASE: ${DB_NAME:?must-specify-db-name} |
|
226 | MYSQL_DATABASE: ${DB_NAME:?must-specify-db-name} | |
226 | MYSQL_USER: ${DB_USER:?must-specify-db-user} |
|
227 | MYSQL_USER: ${DB_USER:?must-specify-db-user} | |
227 | MYSQL_PASSWORD: ${DB_PASSWORD:?must-specify-db-password} |
|
228 | MYSQL_PASSWORD: ${DB_PASSWORD:?must-specify-db-password} | |
228 | MYSQL_ROOT_PASSWORD: ${DB_PASSWORD:?must-specify-db-password} |
|
229 | MYSQL_ROOT_PASSWORD: ${DB_PASSWORD:?must-specify-db-password} | |
229 | env_file: |
|
230 | env_file: | |
230 | - ${RC_ENV_FILE:?must-specify-rc-env-file} |
|
231 | - ${RC_ENV_FILE:?must-specify-rc-env-file} | |
231 |
|
232 | |||
232 | restart: always |
|
233 | restart: always | |
233 |
|
234 | |||
234 | # ports: |
|
235 | # ports: | |
235 | # - "127.0.0.1::3306" |
|
236 | # - "127.0.0.1::3306" | |
236 |
|
237 | |||
237 | volumes: |
|
238 | volumes: | |
238 | - ./config/database/mysql_customized.conf:/etc/mysql/conf.d/config-file.cnf:ro |
|
239 | - ./config/database/mysql_customized.conf:/etc/mysql/conf.d/config-file.cnf:ro | |
239 | # save the mysql_data volume |
|
240 | # save the mysql_data volume | |
240 | - $PWD/mysql_dir:/var/lib/mysql |
|
241 | - $PWD/mysql_dir:/var/lib/mysql | |
241 | - logvolume:/var/log/rhodecode |
|
242 | - logvolume:/var/log/rhodecode | |
242 |
|
243 | |||
243 | profiles: |
|
244 | profiles: | |
244 | ["mysql"] |
|
245 | ["mysql"] | |
245 |
|
246 | |||
246 | logging: |
|
247 | logging: | |
247 | *custom-logging |
|
248 | *custom-logging |
General Comments 0
You need to be logged in to leave comments.
Login now