docker-compose-router.yaml
44 lines
| 1.1 KiB
| text/x-yaml
|
YamlLexer
r23 | version: '3.9' | |||
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: | ||||
r52 | #loki-url: "http://loki:3100/loki/api/v1/push" | |||
loki-url: "http://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: | ||||
r34 | image: traefik:v2.9.6 | |||
r23 | ||||
ports: | ||||
# The HTTP port, exposed as http entrypoint | ||||
- "80:80" | ||||
# The HTTPS port, exposed as https entrypoint | ||||
- "443:443" | ||||
# The SSH port | ||||
- "${RC_SSH_PORT}:${RC_SSH_PORT}" | ||||
volumes: | ||||
# So that Traefik can listen to the Docker events | ||||
- /var/run/docker.sock:/var/run/docker.sock | ||||
- ./config/traefik:/etc/traefik | ||||
deploy: | ||||
placement: | ||||
constraints: | ||||
# limit swarm deploy to MANAGER only | ||||
- node.role == manager | ||||
networks: | ||||
- rhodecode_network | ||||
labels: | ||||
- "traefik.enable=true" | ||||
logging: | ||||
*custom-logging | ||||