Skip to content

Instantly share code, notes, and snippets.

@TEGRAXD
Created January 8, 2025 15:20
Show Gist options
  • Select an option

  • Save TEGRAXD/3dc539ed8f05a53cf423a9a36c276a56 to your computer and use it in GitHub Desktop.

Select an option

Save TEGRAXD/3dc539ed8f05a53cf423a9a36c276a56 to your computer and use it in GitHub Desktop.
Portainer Docker Compose with External Network
services:
portainer:
image: portainer/portainer-ce:latest
container_name: portainer
ports:
- "9000:9000" # Any ports of the service that you want to expose.
networks:
- cloudflared_tunnel # The name of cloudflared tunnel docker network.
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- portainer_data:/data
networks:
cloudflared_tunnel: # This is the name of the network that we created in the cloudflared container.
external: true # External "true" means we already create it and to be able to use it in this stack.
volumes:
portainer_data: # Create new volume named "portainer_data".
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment