Skip to content

Instantly share code, notes, and snippets.

@marcelo-ochoa
Created October 28, 2019 14:16
Show Gist options
  • Save marcelo-ochoa/eb0b7c4a8c869a8a7a3fc71354e2cb85 to your computer and use it in GitHub Desktop.
Save marcelo-ochoa/eb0b7c4a8c869a8a7a3fc71354e2cb85 to your computer and use it in GitHub Desktop.
A docker compose stack for Portainer.IO and agents using GlusterFS volume driver plugin
version: '3.6'
services:
agent:
image: portainer/agent
environment:
AGENT_CLUSTER_ADDR: tasks.portainer_agent
# AGENT_PORT: 9001
# LOG_LEVEL: debug
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /var/lib/docker/volumes:/var/lib/docker/volumes
networks:
- agent_network
deploy:
mode: global
placement:
constraints: [node.platform.os == linux]
portainer:
image: portainer/portainer
command: -H tcp://tasks.portainer_agent:9001 --tlsskipverify
ports:
- "9000:9000"
- "8000:8000"
volumes:
- portainer_data:/data
networks:
- agent_network
- lb_network
deploy:
mode: replicated
replicas: 1
placement:
constraints: [node.role == manager]
networks:
agent_network:
driver: overlay
attachable: true
lb_network:
external: true
volumes:
portainer_data:
driver: glusterfs
name: "myvolume/portainer"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment