docker-compose-apps.yaml
312 lines
| 8.6 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" | ||||
volumes: | ||||
# volume for RhodeCode repo-store, it's where the repositories will be stored | ||||
rhodecode_repos: | ||||
labels: | ||||
"keep": 1 | ||||
services: | ||||
rhodecode: | ||||
networks: | ||||
- rhodecode_network | ||||
image: rhodecode/rhodecode-${RC_EDITION}:${RC_VERSION:?specify-RC_VERSION-env-var} | ||||
env_file: | ||||
- .custom/.runtime.env | ||||
stdin_open: true | ||||
tty: true | ||||
restart: always | ||||
command: [ | ||||
"/usr/local/bin/rhodecode_bin/bin/gunicorn", | ||||
"--name=gunicorn-rhodecode-1", | ||||
"--error-logfile=-", | ||||
"--paster=/etc/rhodecode/conf/rhodecode.optimized.ini", | ||||
"--config=/etc/rhodecode/conf/gunicorn_conf.py" | ||||
] | ||||
# ports: | ||||
# - "127.0.0.1::10020" | ||||
build: | ||||
context: . | ||||
dockerfile: service/rhodecode/rhodecode.dockerfile | ||||
args: | ||||
TZ: ${TZ} | ||||
RHODECODE_VERSION: ${RC_VERSION:?specify-RC_VERSION-env-var} | ||||
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 | ||||
- rhodecode_repos:/var/opt/rhodecode_repo_store | ||||
- 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: | ||||
- "traefik.enable=false" | ||||
vcsserver: | ||||
networks: | ||||
- rhodecode_network | ||||
image: rhodecode/rhodecode-${RC_EDITION}:${RC_VERSION:?specify-RC_VERSION-env-var} | ||||
env_file: | ||||
- .custom/.runtime.env | ||||
stdin_open: true | ||||
tty: true | ||||
restart: always | ||||
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" | ||||
] | ||||
# 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 | ||||
- rhodecode_repos:/var/opt/rhodecode_repo_store | ||||
- rc_datavolume:/var/opt/rhodecode_data | ||||
logging: | ||||
*custom-logging | ||||
celery: | ||||
networks: | ||||
- rhodecode_network | ||||
image: rhodecode/rhodecode-${RC_EDITION}:${RC_VERSION:?specify-RC_VERSION-env-var} | ||||
env_file: | ||||
- .custom/.runtime.env | ||||
stdin_open: true | ||||
tty: true | ||||
restart: always | ||||
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 | ||||
- rhodecode_repos:/var/opt/rhodecode_repo_store | ||||
- rc_datavolume:/var/opt/rhodecode_data | ||||
logging: | ||||
*custom-logging | ||||
labels: | ||||
- "traefik.enable=false" | ||||
celery-beat: | ||||
# This service is not scalable | ||||
networks: | ||||
- rhodecode_network | ||||
image: rhodecode/rhodecode-${RC_EDITION}:${RC_VERSION:?specify-RC_VERSION-env-var} | ||||
env_file: | ||||
- .custom/.runtime.env | ||||
stdin_open: true | ||||
tty: true | ||||
restart: always | ||||
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 | ||||
- rhodecode_repos:/var/opt/rhodecode_repo_store | ||||
- rc_datavolume:/var/opt/rhodecode_data | ||||
logging: | ||||
*custom-logging | ||||
labels: | ||||
- "traefik.enable=false" | ||||
svn: | ||||
networks: | ||||
- rhodecode_network | ||||
image: rhodecode/rhodecode-${RC_EDITION}:${RC_VERSION:?specify-RC_VERSION-env-var} | ||||
env_file: | ||||
- .custom/.runtime.env | ||||
# build: | ||||
# context: . | ||||
# dockerfile: service/svn/rhodecode_svn.dockerfile | ||||
# args: | ||||
# APACHE_VER: 1.3 | ||||
stdin_open: true | ||||
tty: true | ||||
restart: always | ||||
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 | ||||
- rhodecode_repos:/var/opt/rhodecode_repo_store | ||||
logging: | ||||
*custom-logging | ||||
sshd: | ||||
networks: | ||||
- rhodecode_network | ||||
image: rhodecode/rhodecode-${RC_EDITION}:${RC_VERSION:?specify-RC_VERSION-env-var} | ||||
env_file: | ||||
- .custom/.runtime.env | ||||
stdin_open: true | ||||
tty: true | ||||
restart: always | ||||
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 | ||||
- rhodecode_repos:/var/opt/rhodecode_repo_store | ||||
- 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}" | ||||