mirror of https://github.com/goproxyio/goproxy
Added a contrib/goproxy.yml Stackfile for Docker Swarm deployment using Traefik
parent
5053e78599
commit
dca1b629da
|
@ -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
|
||||||
|
```
|
|
@ -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
|
Loading…
Reference in New Issue