mirror of
https://github.com/nickyeoman/docker-compose-cookbooks.git
synced 2026-09-04 02:46:23 +00:00
added portainer
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user