docker-compose-apps.yaml
329 lines
| 9.3 KiB
| text/x-yaml
|
YamlLexer
r23 | version: '3.9' | |||
x-logging: &custom-logging | ||||
# docker plugin install grafana/loki-docker-driver:latest --alias loki --grant-all-permissions | ||||
# NOTE: loki logging driver ONLY works for host type networks... | ||||
driver: loki | ||||
options: | ||||
loki-url: "http://127.0.0.1:3100/loki/api/v1/push" | ||||
#loki-url: "http://loki:3100/loki/api/v1/push" | ||||
loki-retries: "5" | ||||
loki-timeout: "1s" | ||||
loki-max-backoff: "800ms" | ||||
services: | ||||
rhodecode: | ||||
networks: | ||||
- rhodecode_network | ||||
r29 | extra_hosts: | |||
- "host.docker.internal:host-gateway" | ||||
r27 | image: rhodecode/rhodecode-${RC_EDITION}:${RC_VERSION:-4.28.0} | |||
r23 | stdin_open: true | |||
tty: true | ||||
restart: always | ||||
r40 | env_file: | |||
- ${RC_ENV_FILE:?must-specify-rc-env-file} | ||||
r23 | command: [ | |||
"/usr/local/bin/rhodecode_bin/bin/gunicorn", | ||||
"--name=gunicorn-rhodecode-1", | ||||
"--error-logfile=-", | ||||
"--paster=/etc/rhodecode/conf/rhodecode.optimized.ini", | ||||
r24 | "--config=/etc/rhodecode/conf/gunicorn_conf_rc.py" | |||
r23 | ] | |||
r24 | deploy: | |||
# override this in .custom/docker-compose-apps.override.yaml to scale up | ||||
replicas: 1 | ||||
r23 | ||||
# ports: | ||||
# - "127.0.0.1::10020" | ||||
build: | ||||
context: . | ||||
dockerfile: service/rhodecode/rhodecode.dockerfile | ||||
args: | ||||
TZ: ${TZ} | ||||
r27 | RHODECODE_VERSION: ${RC_VERSION:-4.28.0} | |||
r23 | RHODECODE_DB: postgresql://rhodecode:${DB_PASSWORD:?must-specify-db-password}@database/${DB_NAME:?must-specify-db-name} | |||
RHODECODE_USER_NAME: ${RHODECODE_USER_NAME} | ||||
RHODECODE_USER_PASS: ${RHODECODE_USER_PASS} | ||||
RHODECODE_USER_EMAIL: ${RHODECODE_USER_EMAIL} | ||||
environment: | ||||
RC_APP_TYPE: rhodecode_http | ||||
RC_APP_PROC: 1 | ||||
SSL_CERT_FILE: "/etc/rhodecode/conf/ca-bundle.crt" | ||||
REQUESTS_CA_BUNDLE: "/etc/rhodecode/conf/ca-bundle.crt" | ||||
GIT_SSL_CAINFO: "/etc/rhodecode/conf/ca-bundle.crt" | ||||
GEVENT_RESOLVER: "ares" | ||||
DB_UPGRADE: 1 # run the DB upgrade | ||||
SETUP_APP: 1 # run the application default settings setup, can be turned off after initial run | ||||
#FORCE_DB_INIT_FILE: 1 # force the database init, warning: destroys old DB | ||||
#FORCE_RC_SETUP_APP: 1 # force running setup scripts for configuration/license application | ||||
MAIN_INI_PATH: /etc/rhodecode/conf/rhodecode.optimized.ini | ||||
# SVN Specific | ||||
MOD_DAV_SVN_PORT: 8090 | ||||
APACHE_LOG_DIR: /var/log/rhodecode/svn | ||||
MOD_DAV_SVN_CONF_FILE: /etc/rhodecode/conf/svn/mod_dav_svn.conf | ||||
healthcheck: | ||||
test: [ "CMD", "curl", "-A", "RhodeCode-Healthcheck", "-s", "-o", "/dev/null", "-w", "'%{http_code}'", "http://127.0.0.1:10020/_admin/ops/ping" ] | ||||
timeout: 30s | ||||
interval: 60s | ||||
retries: 10 | ||||
# depends_on: | ||||
# - database | ||||
# - redis | ||||
# - channelstream | ||||
volumes: | ||||
- confvolume:/etc/rhodecode/conf | ||||
- logvolume:/var/log/rhodecode | ||||
r24 | - rc_reposvolume:/var/opt/rhodecode_repo_store | |||
r23 | - rc_datavolume:/var/opt/rhodecode_data | |||
tmpfs: | ||||
- /data_ramdisk:size=${RC_DATA_RAMDISK_SIZE:?specify-RC_DATA_RAMDISK_SIZE-env-var} | ||||
logging: | ||||
*custom-logging | ||||
labels: | ||||
r24 | - "traefik.enable=true" | |||
- "traefik.http.routers.rhodecode.entrypoints=http" | ||||
r33 | - "traefik.http.routers.rhodecode.rule=Host(`${RC_HOSTNAME:?must-specify-rhodecode-hostname}`)" | |||
r24 | - "traefik.http.services.rhodecode.loadbalancer.server.port=10020" | |||
r23 | ||||
vcsserver: | ||||
networks: | ||||
- rhodecode_network | ||||
r29 | extra_hosts: | |||
- "host.docker.internal:host-gateway" | ||||
r27 | image: rhodecode/rhodecode-${RC_EDITION}:${RC_VERSION:-4.28.0} | |||
r23 | stdin_open: true | |||
tty: true | ||||
restart: always | ||||
r40 | env_file: | |||
- ${RC_ENV_FILE:?must-specify-rc-env-file} | ||||
r23 | command: [ | |||
"/home/rhodecode/.rccontrol/vcsserver-1/profile/bin/gunicorn", | ||||
"--name=gunicorn-vcsserver-1", | ||||
"--error-logfile=-", | ||||
"--paster=/etc/rhodecode/conf/vcsserver.optimized.ini", | ||||
"--config=/etc/rhodecode/conf/gunicorn_conf_vcs.py" | ||||
] | ||||
r24 | deploy: | |||
# override this in .custom/docker-compose-apps.override.yaml to scale up | ||||
replicas: 1 | ||||
r23 | ||||
# ports: | ||||
# - "127.0.0.1::10010" | ||||
healthcheck: | ||||
test: [ "CMD", "curl", "-A", "RhodeCode-Healthcheck", "-s", "-o", "/dev/null", "-w", "'%{http_code}'", "http://127.0.0.1:10010/status" ] | ||||
timeout: 30s | ||||
interval: 60s | ||||
retries: 10 | ||||
environment: | ||||
RC_APP_TYPE: rhodecode_vcsserver | ||||
RC_APP_PROC: 1 | ||||
MAIN_INI_PATH: /etc/rhodecode/conf/vcsserver.optimized.ini | ||||
SSL_CERT_FILE: "/etc/rhodecode/conf/ca-bundle.crt" | ||||
REQUESTS_CA_BUNDLE: "/etc/rhodecode/conf/ca-bundle.crt" | ||||
GIT_SSL_CAINFO: "/etc/rhodecode/conf/ca-bundle.crt" | ||||
# depends_on: | ||||
# - redis | ||||
volumes: | ||||
- confvolume:/etc/rhodecode/conf | ||||
- logvolume:/var/log/rhodecode | ||||
r24 | - rc_reposvolume:/var/opt/rhodecode_repo_store | |||
r23 | - rc_datavolume:/var/opt/rhodecode_data | |||
logging: | ||||
*custom-logging | ||||
celery: | ||||
networks: | ||||
- rhodecode_network | ||||
r29 | extra_hosts: | |||
- "host.docker.internal:host-gateway" | ||||
r27 | image: rhodecode/rhodecode-${RC_EDITION}:${RC_VERSION:-4.28.0} | |||
r23 | stdin_open: true | |||
tty: true | ||||
restart: always | ||||
r40 | env_file: | |||
- ${RC_ENV_FILE:?must-specify-rc-env-file} | ||||
r23 | command: [ | |||
"/usr/local/bin/rhodecode_bin/bin/celery", | ||||
"worker", | ||||
"--task-events", | ||||
"--autoscale=10,2", | ||||
"--no-color", | ||||
"--app=rhodecode.lib.celerylib.loader", | ||||
"--loglevel=DEBUG", | ||||
"--ini=/etc/rhodecode/conf/rhodecode.optimized.ini" | ||||
] | ||||
environment: | ||||
RC_APP_TYPE: rhodecode_celery | ||||
RC_APP_PROC: 1 | ||||
MAIN_INI_PATH: /etc/rhodecode/conf/rhodecode.optimized.ini | ||||
SSL_CERT_FILE: "/etc/rhodecode/conf/ca-bundle.crt" | ||||
REQUESTS_CA_BUNDLE: "/etc/rhodecode/conf/ca-bundle.crt" | ||||
GIT_SSL_CAINFO: "/etc/rhodecode/conf/ca-bundle.crt" | ||||
# depends_on: | ||||
# - database | ||||
# - redis | ||||
volumes: | ||||
- confvolume:/etc/rhodecode/conf | ||||
- logvolume:/var/log/rhodecode | ||||
r24 | - rc_reposvolume:/var/opt/rhodecode_repo_store | |||
r23 | - rc_datavolume:/var/opt/rhodecode_data | |||
logging: | ||||
*custom-logging | ||||
labels: | ||||
- "traefik.enable=false" | ||||
celery-beat: | ||||
# This service is not scalable | ||||
networks: | ||||
- rhodecode_network | ||||
r29 | extra_hosts: | |||
- "host.docker.internal:host-gateway" | ||||
r27 | image: rhodecode/rhodecode-${RC_EDITION}:${RC_VERSION:-4.28.0} | |||
r23 | stdin_open: true | |||
tty: true | ||||
restart: always | ||||
r40 | env_file: | |||
- ${RC_ENV_FILE:?must-specify-rc-env-file} | ||||
r23 | command: [ | |||
"/usr/local/bin/rhodecode_bin/bin/celery", | ||||
"beat", | ||||
"--no-color", | ||||
"--app=rhodecode.lib.celerylib.loader", | ||||
"--scheduler=rhodecode.lib.celerylib.scheduler.RcScheduler", | ||||
"--loglevel=DEBUG", | ||||
"--ini=/etc/rhodecode/conf/rhodecode.optimized.ini" | ||||
] | ||||
environment: | ||||
RC_APP_TYPE: rhodecode_beat | ||||
RC_APP_PROC: 1 | ||||
MAIN_INI_PATH: /etc/rhodecode/conf/rhodecode.optimized.ini | ||||
SSL_CERT_FILE: "/etc/rhodecode/conf/ca-bundle.crt" | ||||
REQUESTS_CA_BUNDLE: "/etc/rhodecode/conf/ca-bundle.crt" | ||||
GIT_SSL_CAINFO: "/etc/rhodecode/conf/ca-bundle.crt" | ||||
# depends_on: | ||||
# - database | ||||
# - redis | ||||
volumes: | ||||
- confvolume:/etc/rhodecode/conf | ||||
- logvolume:/var/log/rhodecode | ||||
r24 | - rc_reposvolume:/var/opt/rhodecode_repo_store | |||
r23 | - rc_datavolume:/var/opt/rhodecode_data | |||
logging: | ||||
*custom-logging | ||||
labels: | ||||
- "traefik.enable=false" | ||||
svn: | ||||
networks: | ||||
- rhodecode_network | ||||
r29 | extra_hosts: | |||
- "host.docker.internal:host-gateway" | ||||
r27 | image: rhodecode/rhodecode-${RC_EDITION}:${RC_VERSION:-4.28.0} | |||
r23 | ||||
# build: | ||||
# context: . | ||||
# dockerfile: service/svn/rhodecode_svn.dockerfile | ||||
# args: | ||||
# APACHE_VER: 1.3 | ||||
stdin_open: true | ||||
tty: true | ||||
restart: always | ||||
r40 | env_file: | |||
- ${RC_ENV_FILE:?must-specify-rc-env-file} | ||||
r23 | command: ["apachectl", "-D", "FOREGROUND"] | |||
environment: | ||||
RC_APP_TYPE: rhodecode_svn | ||||
# SVN Specific | ||||
MOD_DAV_SVN_PORT: 8090 | ||||
APACHE_LOG_DIR: /var/log/rhodecode/svn | ||||
MOD_DAV_SVN_CONF_FILE: /etc/rhodecode/conf/svn/mod_dav_svn.conf | ||||
# ports: | ||||
# - "127.0.0.1::8090" | ||||
healthcheck: | ||||
test: [ "CMD", "curl", "-A", "RhodeCode-Healthcheck", "-s", "-o", "/dev/null", "-w", "'%{http_code}'", "http://127.0.0.1:8090/_server_status" ] | ||||
timeout: 30s | ||||
interval: 60s | ||||
retries: 10 | ||||
volumes: | ||||
- confvolume:/etc/rhodecode/conf | ||||
- logvolume:/var/log/rhodecode | ||||
r24 | - rc_reposvolume:/var/opt/rhodecode_repo_store | |||
r23 | ||||
logging: | ||||
*custom-logging | ||||
sshd: | ||||
networks: | ||||
- rhodecode_network | ||||
r29 | extra_hosts: | |||
- "host.docker.internal:host-gateway" | ||||
r27 | image: rhodecode/rhodecode-${RC_EDITION}:${RC_VERSION:-4.28.0} | |||
r23 | ||||
stdin_open: true | ||||
tty: true | ||||
restart: always | ||||
r40 | env_file: | |||
- ${RC_ENV_FILE:?must-specify-rc-env-file} | ||||
r23 | command: ["/usr/sbin/sshd", "-f", "/etc/rhodecode/sshd_config", "-D", "-e"] | |||
environment: | ||||
RC_APP_TYPE: rhodecode_sshd | ||||
SSH_BOOTSTRAP: 1 | ||||
# ports: | ||||
# # set from .env file | ||||
# - "${RC_SSH_PORT:?must-specify-ssh-port}:22" | ||||
volumes: | ||||
- confvolume:/etc/rhodecode/conf | ||||
- logvolume:/var/log/rhodecode | ||||
r24 | - rc_reposvolume:/var/opt/rhodecode_repo_store | |||
r23 | - rc_datavolume:/var/opt/rhodecode_data | |||
logging: | ||||
*custom-logging | ||||
labels: | ||||
- "traefik.enable=true" | ||||
- "traefik.http.routers.sshd.entrypoints=ssh" | ||||
- "traefik.http.routers.sshd.rule=Host(`*`)" | ||||
- "traefik.http.services.sshd.loadbalancer.server.port=${RC_SSH_PORT:?must-specify-ssh-port}" | ||||