forked from earlhickey/home-assistant-pi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
102 lines (95 loc) · 3.54 KB
/
docker-compose.yml
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
version: '2.4'
services:
reverse-proxy:
container_name: reverse-proxy
# The official v2.2 Traefik docker image
image: traefik:v2.2
command:
- "--global.sendanonymoususage=false"
- "--api.dashboard=true"
- "--entrypoints.web.address=:80"
- "--entrypoints.websecure.address=:443"
- "--entrypoints.mqtt.address=:1883"
- "--entrypoints.mysql.address=:3306"
- "--entrypoints.phosconws.address=:8443"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--providers.docker.network=traefik_proxy"
- "--providers.file=true"
- "--providers.file.filename=/etc/traefik/providers-config.toml"
- "--certificatesresolvers.le=true"
- "--certificatesresolvers.le.acme.email=${LETSENCRYPT_ACME_EMAIL}"
- "--certificatesresolvers.le.acme.storage=/etc/traefik/ssl/acme.json"
- "--certificatesresolvers.le.acme.httpchallenge=true"
- "--certificatesresolvers.le.acme.httpchallenge.entrypoint=web"
restart: always
environment:
ACME_EMAIL: "${LETSENCRYPT_ACME_EMAIL}"
ADDRESS: "192.168.11.10"
HA_DOMAIN_NAME: "${EXTERNAL_DOMAIN}"
LAN_DOMAIN_NAME: "${INTERNAL_DOMAIN}"
networks:
- traefik_proxy
extra_hosts:
- host.docker.internal:172.17.0.1
ports:
- 80:80
- 443:443
# - 1883:1883 # mosquito
# - 3306:3306 # mysql
# - 8443:8443 # phoscon deconz
volumes:
# So that Traefik can listen to the Docker events
- /var/run/docker.sock:/var/run/docker.sock:ro
- ${PERSIST_DATA_PATH}/data/traefik-config:/etc/traefik
labels:
- "traefik.enable=true"
- "traefik.http.routers.dashboard.rule=Host(`traefik.${INTERNAL_DOMAIN}`)"
- "traefik.http.routers.dashboard.entrypoints=web"
- "traefik.http.routers.dashboard.service=api@internal"
logging:
options:
max-size: 10m
portainer:
container_name: portainer
image: portainer/portainer:1.24.0
restart: always
networks:
- traefik_proxy
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./data/portainer-data:/data
labels:
- "traefik.enable=true"
- "traefik.http.routers.portainer.rule=Host(`portainer.${INTERNAL_DOMAIN}`)"
- "traefik.http.routers.portainer.entrypoints=web"
- "traefik.http.routers.portainer.service=portainer"
- "traefik.http.services.portainer.loadbalancer.server.port=9000"
logging:
options:
max-size: 10m
# dyndns:
# container_name: dyndns
# image: oznu/cloudflare-ddns:latest
# restart: always
# networks:
# - host_applications
# environment:
# API_KEY: "${CLOUDFLARE_API_KEY}"
# ZONE: "${DYNDNS_ZONE}"
# SUBDOMAIN: "${DYNDNS_SUBDOMAIN}"
networks:
# host_applications:
# name: applications
# driver: bridge
# ipam:
# config:
# - subnet: 172.18.0.0/24
# gateway: 172.18.0.1
traefik_proxy:
name: traefik_proxy
driver: bridge
ipam:
config:
- subnet: 172.24.0.0/16
gateway: 172.24.0.1