Added a contrib/goproxy.yml Stackfile for Docker Swarm deployment using Traefik

pull/46/head
James Mills 2019-01-10 18:26:39 +10:00 committed by kun
parent 5053e78599
commit dca1b629da
2 changed files with 43 additions and 0 deletions

12
contrib/README.md Normal file
View File

@ -0,0 +1,12 @@
# contrib
## goproxy.yml
A Docker Swarm mode Stackfile configured for the [Traefik](https://traefik.io)
ingress controller ready to deploy in your swarm cluster.
Deploy with:
```#!bash
docker stack deploy -c goproxy.yml
```

31
contrib/goproxy.yml Normal file
View File

@ -0,0 +1,31 @@
version: "3.4"
services:
goproxy:
image: goproxy/goproxy
volumes:
- goproxy:/go
networks:
- bridge
- traefik
deploy:
placement:
constraints:
- "node.hostname == dm1.mydomain.com"
labels:
- "traefik.enable=true"
- "traefik.port=8081"
- "traefik.backend=goproxy"
- "traefik.docker.network=traefik"
- "traefik.frontend.rule=Host:goproxy.mydomain.com"
replicas: 1
networks:
bridge:
external: true
traefik:
external: true
volumes:
goproxy:
driver: local