# Portainer

services:
    portainer:
        container_name: portainer
        ports:
            - "8000:8000" # For HTTP API access (if needed directly)
            - "9000:9000" # HTTP UI access (if needed directly)
            - "9443:9443" # HTTPS UI access (if needed directly)
            - "9001:9001" # Edge Agent port (if used directly)
        volumes:
            - "/var/run/docker.sock:/var/run/docker.sock"
            - "/srv/portainer/data:/data"
        image: portainer/portainer-ce:lts
        environment:
            - "TRUSTED_ORIGINS=portainer" # Set to your local domain
        command: --tlsskipverify --base-url="https://portainer" # Portainer's command-line arguments
        networks:
            - frontend
        restart: unless-stopped

networks:
    # Define the 'frontend' network as external, meaning it's created elsewhere (e.g., by Traefik's compose file).
    frontend:
        external: true
