Forked from containeroo-gists/portainer-docker-compose.yml
Created
August 6, 2021 22:24
-
-
Save shawnhank/dd5a213dd59f4fb14a8cec8d93f09805 to your computer and use it in GitHub Desktop.
Portainer Docker Compose
This file contains hidden or 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: | |
portainer: | |
image: portainer/portainer:latest | |
container_name: portainer | |
restart: unless-stopped | |
security_opt: | |
- no-new-privileges:true | |
networks: | |
- proxy | |
volumes: | |
- /etc/localtime:/etc/localtime:ro | |
- /var/run/docker.sock:/var/run/docker.sock:ro | |
- ./data:/data | |
labels: | |
- "traefik.enable=true" | |
- "traefik.http.routers.portainer.entrypoints=http" | |
- "traefik.http.routers.portainer.rule=Host(`portainer.example.com`)" | |
- "traefik.http.middlewares.portainer-https-redirect.redirectscheme.scheme=https" | |
- "traefik.http.routers.portainer.middlewares=portainer-https-redirect" | |
- "traefik.http.routers.portainer-secure.entrypoints=https" | |
- "traefik.http.routers.portainer-secure.rule=Host(`portainer.example.com`)" | |
- "traefik.http.routers.portainer-secure.tls=true" | |
- "traefik.http.routers.portainer-secure.tls.certresolver=http" | |
- "traefik.http.routers.portainer-secure.service=portainer" | |
- "traefik.http.services.portainer.loadbalancer.server.port=9000" | |
- "traefik.docker.network=proxy" | |
networks: | |
proxy: | |
external: true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment