Created
January 8, 2025 15:20
-
-
Save TEGRAXD/3dc539ed8f05a53cf423a9a36c276a56 to your computer and use it in GitHub Desktop.
Portainer Docker Compose with External Network
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
| 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