swarm_stack/guacamole/docker-compose.yml
2019-06-04 22:58:42 +02:00

77 lines
1.5 KiB
YAML

version: '3'
services:
web:
image: guacamole/guacamole:latest
depends_on:
- db
- guacd
environment:
- POSTGRES_HOSTNAME=db
- POSTGRES_DATABASE=guacamole_db
- POSTGRES_USER=user
- POSTGRES_PASSWORD=pwd
- GUACD_HOSTNAME=guacd
deploy:
resources:
limits:
cpus: '0.5'
memory: 1G
reservations:
cpus: '0.25'
memory: 500M
labels:
- "traefik.port=8080"
- "traefik.frontend.rule=Host:guacamole.admin.arnaud-pc.fr;PathPrefix:/guacamole"
- "traefik.docker.network=dmz"
- "traefik.passHostHeader=true"
- "traefik.backend.loadbalancer.swarm=true"
- "traefik.backend.loadbalancer.method=drr"
- "traefik.enable=true"
networks:
- dmz
- guacamole
guacd:
image: guacamole/guacd:latest
deploy:
resources:
limits:
cpus: '0.5'
memory: 200M
reservations:
cpus: '0.1'
memory: 50M
networks:
- guacamole
db:
image: postgres:latest
environment:
- POSTGRES_USER=user
- POSTGRES_PASSWORD=pwd
- POSTGRES_DB=guacamole_db
volumes:
- postgres_data:/var/lib/postgresql/data
deploy:
resources:
limits:
cpus: '0.5'
memory: 200M
reservations:
cpus: '0.1'
memory: 50M
networks:
- guacamole
networks:
guacamole:
driver: overlay
dmz:
external:
name: dmz
volumes:
postgres_data:
driver: convoy