Created
January 9, 2021 03:20
-
-
Save prologic/e935cf9b82a9a112096e24e72f5e2c95 to your computer and use it in GitHub Desktop.
"Hello World" Go service with Tradfik as Ingress Load Balancer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
version: "3.8" | |
services: | |
hello: | |
image: r.mills.io/prologic/hello-go | |
networks: | |
- traefik | |
deploy: | |
mode: replicated | |
replicas: 3 | |
labels: | |
- "traefik.enable=true" | |
- "traefik.docker.network=traefik" | |
- "traefik.http.services.hello.loadbalancer.server.port=8000" | |
- "traefik.http.routers.hello.rule=HostRegexp(`{subdomain:.+}.mills.io`)" | |
- "traefik.http.routers.hello.priority=1" | |
- "traefik.http.routers.mills.rule=Host(`mills.io`)" | |
- "traefik.http.routers.mills.priority=1" | |
resources: | |
limits: | |
cpus: "0.1" | |
memory: 50M | |
restart_policy: | |
condition: on-failure | |
networks: | |
traefik: | |
external: true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment