added portainer

This commit is contained in:
2024-07-20 11:12:40 -07:00
parent 74dca8091c
commit f7d986b0f0
3 changed files with 82 additions and 34 deletions
+24 -33
View File
@@ -1,38 +1,29 @@
################################################################################
# Portainer
# You should only need one instance of this running
# Change .env then
# docker-compose up -d
#
# Version 2
################################################################################
version: '2'
volumes:
portainer:
networks:
admin_web:
external:
name: admin_web
version: '3'
services:
portainer:
image: portainer/portainer:${PORTAINER_V}
command: -H unix:///var/run/docker.sock
restart: unless-stopped
networks:
- admin_web
image: ${PORTAINER_IMAGE:-portainer/portainer-ce:latest}
ports:
- 9000:9000
environment:
- AGENT_SECRET=${AGENT_SECRET}
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./templates/templates.json:/templates.json
- portainer:/data
command: -H unix:///var/run/docker.sock
labels:
- "traefik.enable=true"
- "traefik.http.routers.portainer.rule=Host(`${PORTAINER_DOMAIN_NAME}`)"
- "traefik.http.routers.portainer.entrypoints=websecure"
- "traefik.http.routers.portainer.tls.certresolver=letsencrypt"
- "traefik.http.services.portainer.loadbalancer.server.port=9000"
- "${VOL_PATH:-./config}/portainer:/data"
restart: always
networks:
- portainer-net
portainer-agent:
image: ${PORTAINER_AGENT_IMAGE:-portainer/agent:latest}
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /var/lib/docker/volumes:/var/lib/docker/volumes
environment:
- AGENT_SECRET=${AGENT_SECRET}
ports:
- 9001:9001
restart: always
networks:
- portainer-net