docker-compose-services.yaml
324 lines
| 8.7 KiB
| text/x-yaml
|
YamlLexer
r23 | |||
x-logging: &custom-logging | |||
r47 | # docker plugin install grafana/loki-docker-driver:2.7.1 --alias loki --grant-all-permissions | ||
r23 | # NOTE: loki logging driver ONLY works for host type networks... | ||
driver: loki | |||
options: | |||
r57 | #loki-url: "http://${RC_LOKI_AUTH}loki:3100/loki/api/v1/push" | ||
loki-url: "http://${RC_LOKI_AUTH}127.0.0.1:3100/loki/api/v1/push" | |||
r23 | loki-retries: "5" | ||
loki-timeout: "1s" | |||
loki-max-backoff: "800ms" | |||
volumes: | |||
# volume for redis data store | |||
redis_data: | |||
labels: | |||
"keep": 1 | |||
# volume for Postgres db store | |||
# volume for Postgres Data | |||
pg_data: | |||
labels: | |||
"keep": 1 | |||
# volume for rhodecode elasticsearch | |||
es_data: | |||
labels: | |||
"keep": 1 | |||
services: | |||
channelstream: | |||
networks: | |||
- rhodecode_network | |||
image: channelstream/channelstream:0.7.1 | |||
restart: always | |||
# ports: | |||
r73 | # - "127.0.0.1:8000:8000" | ||
r40 | env_file: | ||
- ${RC_ENV_FILE:?must-specify-rc-env-file} | |||
r24 | command: ["channelstream"] | ||
r23 | |||
healthcheck: | |||
r285 | test: curl -A RhodeCode-Healthcheck -s -o /dev/null -w '%{http_code}' http://channelstream:8000/admin/sign_in | ||
timeout: 30s | |||
start_period: 5s | |||
interval: 60s | |||
retries: 10 | |||
r23 | |||
volumes: | |||
- confvolume:/etc/rhodecode/conf | |||
r76 | |||
r23 | logging: | ||
*custom-logging | |||
labels: | |||
r73 | - "traefik.enable=true" | ||
- "traefik.http.routers.channelstream.entrypoints=http" | |||
- "traefik.http.routers.channelstream.priority=20" | |||
- "traefik.http.routers.channelstream.rule=Host(`${RC_HOSTNAME:?must-specify-rhodecode-hostname}`) && PathPrefix(`/_channelstream`)" | |||
- "traefik.http.routers.channelstream.service=channelstream-web" | |||
- "traefik.http.routers.channelstream.middlewares=strip-cs" | |||
- "traefik.http.middlewares.strip-cs.stripprefix.prefixes=/_channelstream" | |||
- "traefik.http.services.channelstream-web.loadbalancer.server.port=8000" | |||
# HTTP + SSL example, should be put into .custom/docker-compose-services.override.yaml | |||
#- "traefik.http.routers.channelstream.entrypoints=http,https" | |||
r23 | |||
profiles: | |||
["channelstream"] | |||
r233 | nginx-statics: | ||
r236 | |||
r213 | # used to serve static files | ||
r23 | networks: | ||
- rhodecode_network | |||
r294 | image: library/nginx:1.25.3 | ||
r23 | |||
restart: always | |||
environment: | |||
NGINX_ENTRYPOINT_QUIET_LOGS: 1 | |||
r40 | env_file: | ||
- ${RC_ENV_FILE:?must-specify-rc-env-file} | |||
r23 | |||
healthcheck: | |||
r285 | test: curl -A RhodeCode-Healthcheck -s -o /dev/null -w '%{http_code}' --fail http://127.0.0.1:80/_health_static | ||
r23 | timeout: 30s | ||
r285 | start_period: 5s | ||
r23 | interval: 60s | ||
retries: 10 | |||
# depends_on: | |||
# - channelstream | |||
volumes: | |||
r334 | - $PWD/config/nginx/nginx_statics.conf:/etc/nginx/nginx.conf:ro | ||
- $PWD/.custom/static_files:/var/opt/rhodecode_static_data | |||
r23 | - rc_datavolume:/var/opt/rhodecode_data | ||
logging: | |||
*custom-logging | |||
labels: | |||
- "traefik.enable=true" | |||
r339 | - "traefik.http.routers.nginx-statics.entrypoints=http" | ||
- "traefik.http.routers.nginx-statics.priority=40" | |||
- "traefik.http.routers.nginx-statics.rule=Host(`${RC_HOSTNAME:?must-specify-rhodecode-hostname}`) && PathPrefix(`/_static/rhodecode`, `/_pages`)" | |||
- "traefik.http.routers.nginx-statics.service=nginx-serv" | |||
r125 | - "traefik.http.services.nginx-serv.loadbalancer.server.port=80" | ||
# HTTP + SSL example, should be put into .custom/docker-compose-services.override.yaml | |||
r339 | #- "traefik.http.routers.nginx-statics.entrypoints=http, https" | ||
r125 | |||
nginx-errors: | |||
networks: | |||
- rhodecode_network | |||
r294 | image: library/nginx:1.25.3 | ||
r125 | |||
restart: always | |||
environment: | |||
NGINX_ENTRYPOINT_QUIET_LOGS: 1 | |||
env_file: | |||
- ${RC_ENV_FILE:?must-specify-rc-env-file} | |||
volumes: | |||
r334 | - $PWD/config/nginx/nginx_errors.conf:/etc/nginx/nginx.conf:ro | ||
- $PWD/config/nginx/error_pages:/etc/nginx/error_pages | |||
r125 | |||
- rc_datavolume:/var/opt/rhodecode_data | |||
labels: | |||
- "traefik.enable=true" | |||
# error-middleware | |||
- "traefik.http.middlewares.error-pages-middleware.errors.status=404" | |||
- "traefik.http.middlewares.error-pages-middleware.errors.service=error-pages-service" | |||
- "traefik.http.middlewares.error-pages-middleware.errors.query=/{status}.html" | |||
# error handling router | |||
- "traefik.http.routers.error-router.entrypoints=http" | |||
- "traefik.http.routers.error-router.priority=5" | |||
- "traefik.http.routers.error-router.rule=HostRegexp(`{host:.+}`)" | |||
- "traefik.http.routers.error-router.service=error-pages-service" | |||
- "traefik.http.routers.error-router.middlewares=error-pages-middleware" | |||
- "traefik.http.services.error-pages-service.loadbalancer.server.port=80" | |||
r73 | # HTTP + SSL example, should be put into .custom/docker-compose-services.override.yaml | ||
r125 | #- "traefik.http.routers.error-router.entrypoints=http, https" | ||
r23 | |||
elasticsearch: | |||
networks: | |||
- rhodecode_network | |||
image: elasticsearch:6.8.23 | |||
r172 | restart: always | ||
r23 | environment: | ||
- cluster.name=elasticsearch-cluster | |||
- network.host=0.0.0.0 | |||
- bootstrap.memory_lock=true | |||
- discovery.type=single-node | |||
r322 | - cluster.routing.allocation.disk.threshold_enabled=false | ||
- cluster.name=rhodecode-elasticsearch | |||
- xpack.security.enabled=false | |||
r23 | - "ES_JAVA_OPTS=-Xms512m -Xmx512m" | ||
r40 | env_file: | ||
- ${RC_ENV_FILE:?must-specify-rc-env-file} | |||
r23 | healthcheck: | ||
# change port 80 to 443 when only using SSL | |||
test: [ "CMD", "curl", "-A", "RhodeCode-Healthcheck", "-s", "-o", "/dev/null", "-w", "'%{http_code}'", "elasticsearch:9200/_cat/health" ] | |||
timeout: 30s | |||
interval: 60s | |||
retries: 10 | |||
r262 | # compat problems within some systems on settings those | ||
#ulimits: | |||
#memlock: | |||
#soft: -1 | |||
#hard: -1 | |||
r23 | |||
volumes: | |||
- es_data:/usr/share/elasticsearch/data | |||
logging: | |||
*custom-logging | |||
profiles: | |||
["elasticsearch"] | |||
redis: | |||
networks: | |||
- rhodecode_network | |||
r377 | image: library/redis:7.2.4 | ||
r23 | |||
restart: always | |||
r40 | env_file: | ||
- ${RC_ENV_FILE:?must-specify-rc-env-file} | |||
r23 | command: | ||
- "redis-server" | |||
- "/etc/redis/redis.conf" | |||
- "--maxmemory-policy allkeys-lru" | |||
r27 | - "--maxmemory ${RC_REDIS_MAXMEMORY:?must-specify-redis-maxmemory}" | ||
r23 | |||
# ports: | |||
# - "127.0.0.1::6379" | |||
healthcheck: | |||
test: [ "CMD", "redis-cli", "--raw", "incr", "ping" ] | |||
interval: 60s | |||
volumes: | |||
r334 | - $PWD/config/redis/redis.conf:/etc/redis/redis.conf:ro | ||
r23 | - redis_data:/data | ||
profiles: | |||
["redis"] | |||
logging: | |||
*custom-logging | |||
database: | |||
networks: | |||
- rhodecode_network | |||
r345 | image: library/postgres:14.10 | ||
r23 | |||
environment: | |||
POSTGRES_DB: ${DB_NAME:?must-specify-db-name} | |||
POSTGRES_USER: ${DB_USER:?must-specify-db-user} | |||
PGUSER: ${DB_USER:?must-specify-db-user} | |||
POSTGRES_PASSWORD: ${DB_PASSWORD:?must-specify-db-password} | |||
POSTGRES_HOST_AUTH_METHOD: md5 | |||
POSTGRES_INITDB_ARGS: "--auth-host=md5 --auth-local=md5" | |||
r40 | env_file: | ||
- ${RC_ENV_FILE:?must-specify-rc-env-file} | |||
r23 | |||
r28 | restart: always | ||
r23 | command: | ||
- "postgres" | |||
- "-c" | |||
- "log_statement=ddl" | |||
- "-c" | |||
- "config_file=/etc/conf.d/pg_customized.conf" | |||
# ports: | |||
# - "127.0.0.1::5432" | |||
healthcheck: | |||
test: ["CMD-SHELL", "pg_isready", '-U', "$DB_USER"] | |||
interval: 10s | |||
timeout: 5s | |||
retries: 5 | |||
volumes: | |||
- $PWD/config/database/pg_customized.conf:/etc/conf.d/pg_customized.conf:ro | |||
# db dumps reverse mount | |||
- $PWD/.custom/db_dump:/var/rc-data-dump | |||
# save the pg_data volume | |||
- pg_data:/var/lib/postgresql/data | |||
r76 | |||
r23 | |||
profiles: | |||
r60 | ["postgres", "database"] | ||
r23 | |||
logging: | |||
*custom-logging | |||
database-mysql: | |||
networks: | |||
- rhodecode_network | |||
r294 | image: library/mysql:8.0.35 | ||
r23 | |||
environment: | |||
MYSQL_DATABASE: ${DB_NAME:?must-specify-db-name} | |||
MYSQL_USER: ${DB_USER:?must-specify-db-user} | |||
MYSQL_PASSWORD: ${DB_PASSWORD:?must-specify-db-password} | |||
MYSQL_ROOT_PASSWORD: ${DB_PASSWORD:?must-specify-db-password} | |||
r40 | env_file: | ||
- ${RC_ENV_FILE:?must-specify-rc-env-file} | |||
r23 | |||
r28 | restart: always | ||
r23 | |||
# ports: | |||
# - "127.0.0.1::3306" | |||
volumes: | |||
r334 | - $PWD/config/database/mysql_customized.conf:/etc/mysql/conf.d/config-file.cnf:ro | ||
r23 | # save the mysql_data volume | ||
- $PWD/mysql_dir:/var/lib/mysql | |||
r76 | |||
r23 | profiles: | ||
["mysql"] | |||
logging: | |||
*custom-logging | |||
r73 | |||
r219 | # DEBUG/DEVEL | ||
httpbin: | |||
networks: | |||
- rhodecode_network | |||
image: kennethreitz/httpbin:latest | |||
r232 | ports: | ||
# expose on 9090 to not block 80 for traefik | |||
- "9090:80" | |||
r219 | profiles: | ||
r242 | ["testing"] | ||
restart: always | |||
ldap-server: | |||
networks: | |||
- rhodecode_network | |||
image: rroemhild/test-openldap:latest | |||
ports: | |||
# expose on 10389 (ldap) 10636 (ldaps) | |||
- "10389:10389" | |||
- "10636:10636" | |||
profiles: | |||
["testing"] | |||
r219 | |||
restart: always |