Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save containeroo-gists/97d17bb78aab9d0e7cd7cd3d3b8db0db to your computer and use it in GitHub Desktop.
Save containeroo-gists/97d17bb78aab9d0e7cd7cd3d3b8db0db to your computer and use it in GitHub Desktop.
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.routers.portainer.middlewares=https-redirect@file"
- "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
@Brice187
Copy link

Brice187 commented Oct 1, 2019

Wrong indentation on line 2

@containeroo-gists
Copy link
Author

Wrong indentation on line 2

you're absolutely right! thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment