homelab/docker/compose/portainer/docker-compose.yml
2025-02-10 22:02:42 -08:00

53 lines
1.4 KiB
YAML

networks:
portainer:
name: portainer
traefik:
external: true
services:
agent:
image: portainer/agent:2.16.2
container_name: agent
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /mnt/docker/docker-root/volumes:/var/lib/docker/volumes
networks:
- portainer
ports:
- "9001:9001"
environment:
AGENT_SECRET: ${PORTAINER_AGENT_SECRET}
restart: unless-stopped
portainer:
image: portainer/portainer-ce:2.21.5
container_name: portainer
command: -H tcp://agent:9001 --tlsskipverify --bind :9000 --tunnel-port 8000 --admin-password ${PORTAINER_HTPASSWD}
ports:
- "9000:9000"
- "8000:8000"
volumes:
- /mnt/docker/volumes/portainer/data:/data
networks:
- portainer
- traefik
environment:
AGENT_SECRET: ${PORTAINER_AGENT_SECRET}
restart: unless-stopped
labels:
- "traefik.enable=true"
- "traefik.http.routers.portainer.rule=Host(`portainer.jumper.mnke.org`)"
- "traefik.http.routers.portainer.entrypoints=websecure"
- "traefik.http.routers.portainer.tls=true"
- "traefik.http.services.portainer.loadbalancer.server.port=9000"
- "traefik.docker.network=traefik"
deploy:
resources:
limits:
cpus: '0.25'
memory: 512M
reservations:
cpus: '0.1'
memory: 64M