-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
43 lines (38 loc) · 1.51 KB
/
docker-compose.yaml
File metadata and controls
43 lines (38 loc) · 1.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# docker-compose.yaml - Portainer - START
services:
portainer:
image: portainer/portainer-ce:lts
command: -H unix:///var/run/docker.sock
container_name: ${COMPOSE_PROJECT_NAME}
labels:
- traefik.enable=true
# HTTP Router
- traefik.http.routers.${COMPOSE_PROJECT_NAME}-http.rule=${HOSTRULE}
- traefik.http.routers.${COMPOSE_PROJECT_NAME}-http.entrypoints=web-http
- traefik.http.routers.${COMPOSE_PROJECT_NAME}-http.middlewares=redirect-to-https@file
# HTTPS Router
- traefik.http.routers.${COMPOSE_PROJECT_NAME}.rule=${HOSTRULE}
- traefik.http.routers.${COMPOSE_PROJECT_NAME}.entrypoints=websecure-https
- traefik.http.routers.${COMPOSE_PROJECT_NAME}.tls.certresolver=letsEncrypt
- traefik.http.routers.${COMPOSE_PROJECT_NAME}.tls.options=modern@file
- traefik.http.routers.${COMPOSE_PROJECT_NAME}.middlewares=geo-block@file,security-headers@file,compression@file,rate-limit@file
- traefik.http.services.${COMPOSE_PROJECT_NAME}.loadbalancer.passHostHeader=true
- traefik.http.services.${COMPOSE_PROJECT_NAME}.loadbalancer.server.port=9000
networks:
- ${PROXY_NETWORK}
restart: "unless-stopped"
volumes:
- portainer_data:/data
- /var/run/docker.sock:/var/run/docker.sock
networks:
traefik_proxy_network:
external: true
name: ${PROXY_NETWORK}
volumes:
portainer_data:
driver: local
driver_opts:
device: ${PWD}/volumes
o: bind
type: none
# docker-compose.yaml - Portainer - ENDE