Last active
April 7, 2023 00:42
-
-
Save ethanjli/4cea100abed699df04f66c9703d370ac to your computer and use it in GitHub Desktop.
Docker Stack demo file for Portainer on a PlanktoScope with Docker and Caddy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3' | |
services: | |
agent: | |
image: portainer/agent:2.17.1 | |
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] | |
server: | |
image: portainer/portainer-ce:2.17.1 | |
command: -H tcp://tasks.agent:9001 --tlsskipverify | |
volumes: | |
- server_data:/data | |
ports: | |
- 9443:9443 | |
- 9000:9000 | |
- 8000:8000 | |
networks: | |
- agent_network | |
- caddy_network | |
labels: | |
caddy: :80 | |
caddy.redir: /admin/portainer /admin/portainer/ | |
caddy.handle_path: /admin/portainer/* | |
caddy.handle_path.reverse_proxy: "{{upstreams 9000}}" | |
deploy: | |
mode: replicated | |
replicas: 1 | |
placement: | |
constraints: [node.role == manager] | |
networks: | |
agent_network: | |
name: agent | |
driver: overlay | |
attachable: true | |
caddy_network: | |
name: caddy | |
external: true | |
volumes: | |
server_data: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment