docker-compose-router.yaml
47 lines
| 1.4 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" | ||||
## docker network create -d overlay lb-net | ||||
services: | ||||
traefik: | ||||
r69 | restart: always | |||
r343 | image: traefik:v2.10.7 | |||
r23 | ||||
ports: | ||||
r414 | # Default ports on Edge router. | |||
# Format is HOST:CONTAINER | ||||
# To modify the HOST ports only change the first parts before colon. | ||||
# | ||||
r23 | # The HTTP port, exposed as http entrypoint | |||
- "80:80" | ||||
# The HTTPS port, exposed as https entrypoint | ||||
- "443:443" | ||||
r73 | # The loki port, exposed as loki entrypoint behind auth | |||
r57 | - "3100:3100" | |||
r73 | # The SSH port exposed as sshd entrypoint, default 9022 | |||
- "${RC_SSH_PORT:-9022}:${RC_SSH_PORT:-9022}" | ||||
r23 | volumes: | |||
# So that Traefik can listen to the Docker events | ||||
- /var/run/docker.sock:/var/run/docker.sock | ||||
r334 | - $PWD/config/traefik:/etc/traefik | |||
- $PWD/config/traefik/dynamic:/etc/traefik_dynamic | ||||
r23 | deploy: | |||
placement: | ||||
constraints: | ||||
# limit swarm deploy to MANAGER only | ||||
- node.role == manager | ||||
networks: | ||||
- rhodecode_network | ||||
r123 | # logging: | |||
# *custom-logging | ||||