feat: use traefik for loadbalancing
Some checks failed
continuous-integration/drone/push Build is failing
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:
parent
384177911c
commit
5317325ab0
@ -1,23 +1,36 @@
|
|||||||
version: '3'
|
version: '3'
|
||||||
services:
|
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:
|
homepage:
|
||||||
container_name: homepage
|
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
image: homepage
|
image: homepage
|
||||||
networks:
|
networks:
|
||||||
- default
|
- internal-nw
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
ports:
|
scale: 4
|
||||||
- "127.0.0.1:1314:80"
|
|
||||||
environment:
|
|
||||||
- ENABLE_IPV6=true
|
|
||||||
volumes:
|
|
||||||
- "/var/run/docker.sock:/tmp/docker.sock:ro"
|
|
||||||
labels:
|
labels:
|
||||||
"homepage": "true"
|
- traefik.enable=true
|
||||||
|
- traefik.http.services.homepage.loadbalancer.server.port=80
|
||||||
|
- traefik.http.routers.homepage.rule=Host(`localhost`)
|
||||||
logging:
|
logging:
|
||||||
driver: json-file
|
driver: json-file
|
||||||
options:
|
options:
|
||||||
max-size: "5m"
|
max-size: "5m"
|
||||||
max-file: "5"
|
max-file: "5"
|
||||||
|
|
||||||
|
networks:
|
||||||
|
internal-nw:
|
||||||
|
internal: true
|
||||||
|
default:
|
||||||
|
Loading…
Reference in New Issue
Block a user