feat: use traefik for loadbalancing
Some checks failed
continuous-integration/drone/push Build is failing

commit 384b118
    refactor: remove redundant ipv6 enablement in env

    * it is already enabled by default, as witnessed by this error message:
    10-listen-on-ipv6-by-default.sh: error: IPv6 listen already enabled

commit abfd7b2
    add: loadbalance using traefik
This commit is contained in:
surtur 2020-10-04 16:07:55 +02:00
parent 384177911c
commit 5317325ab0
Signed by: wanderer
GPG Key ID: 19CE1EC1D9E0486D

View File

@ -1,23 +1,36 @@
version: '3'
services:
reverse-proxy:
image: traefik
command: --api=false --api.dashboard=false --providers.docker
networks:
- internal-nw
- default
ports:
- 127.0.0.1:1314:80
volumes:
# So that traefik can listen to the Docker events
- /var/run/docker.sock:/var/run/docker.sock:ro
homepage:
container_name: homepage
build:
context: .
image: homepage
networks:
- default
- internal-nw
restart: unless-stopped
ports:
- "127.0.0.1:1314:80"
environment:
- ENABLE_IPV6=true
volumes:
- "/var/run/docker.sock:/tmp/docker.sock:ro"
scale: 4
labels:
"homepage": "true"
- traefik.enable=true
- traefik.http.services.homepage.loadbalancer.server.port=80
- traefik.http.routers.homepage.rule=Host(`localhost`)
logging:
driver: json-file
options:
max-size: "5m"
max-file: "5"
networks:
internal-nw:
internal: true
default: