Skip to content

Instantly share code, notes, and snippets.

@prologic
Created January 12, 2021 06:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save prologic/6a72e1feab23f4c967c481457604d1e8 to your computer and use it in GitHub Desktop.
Save prologic/6a72e1feab23f4c967c481457604d1e8 to your computer and use it in GitHub Desktop.
Hello Docker Stack
---
version: "3.8"
services:
hello:
image: prologic/hello-go
networks:
- traefik
deploy:
mode: replicated
replicas: 1
labels:
- "traefik.enable=true"
- "traefik.docker.network=traefik"
- "traefik.http.services.hello.loadbalancer.server.port=8000"
- "traefik.http.routers.hello.rule=HostRegexp(`{subdomain:.+}.$DOMAIN`)"
- "traefik.http.routers.hello.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