Skip to content

Instantly share code, notes, and snippets.

@mattiarossi
Created May 2, 2023 11:02
Show Gist options
  • Select an option

  • Save mattiarossi/7030b57e65b65ff89e3b9d11c0416ca7 to your computer and use it in GitHub Desktop.

Select an option

Save mattiarossi/7030b57e65b65ff89e3b9d11c0416ca7 to your computer and use it in GitHub Desktop.
version: '3.2'
secrets:
portainer-pass:
external: true
services:
agent:
image: portainer/agent:latest
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-ce:latest
command: -H tcp://tasks.agent:9001 --tlsskipverify --admin-password-file '/run/secrets/portainer-pass'
secrets:
- portainer-pass
ports:
- "9443:9443"
- "9000:9000"
- "8000:8000"
volumes:
- portainer_data:/data
networks:
- agent_network
deploy:
mode: replicated
replicas: 1
placement:
constraints: [node.role == manager]
networks:
agent_network:
driver: overlay
attachable: true
volumes:
portainer_data:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment