194 lines
4.6 KiB
YAML
194 lines
4.6 KiB
YAML
version: '3'
|
|
services:
|
|
mosquitto:
|
|
image: "monster1025/alpine86-mosquitto:latest"
|
|
container_name: mosquitto
|
|
env_file: ./mosquitto/settings/mqtt.env
|
|
ports:
|
|
- "1883:1883"
|
|
restart: always
|
|
logging:
|
|
driver: json-file
|
|
options:
|
|
max-size: 50m
|
|
|
|
noolite:
|
|
build: ./noolite/docker
|
|
container_name: noolite
|
|
privileged: true
|
|
restart: always
|
|
depends_on:
|
|
- mosquitto
|
|
env_file: ./mosquitto/settings/mqtt.env
|
|
environment:
|
|
- MQTT_SERVER=mosquitto
|
|
- TOPIC=home
|
|
- CHANNELS=1
|
|
logging:
|
|
driver: json-file
|
|
options:
|
|
max-size: 50m
|
|
|
|
mysql:
|
|
image: mariadb
|
|
container_name: mysql
|
|
env_file: ./mysql/settings/mysql.env
|
|
ports:
|
|
- "3306:3306/tcp"
|
|
restart: unless-stopped
|
|
volumes:
|
|
- /srv/mysql:/var/lib/mysql
|
|
logging:
|
|
driver: json-file
|
|
options:
|
|
max-size: 50m
|
|
|
|
hass:
|
|
image: homeassistant/home-assistant:latest #0.100.3
|
|
container_name: hass
|
|
volumes:
|
|
- ./hass/settings:/config
|
|
- ./hass/settings/hosts.txt:/etc/hosts:ro
|
|
- /etc/localtime:/etc/localtime:ro
|
|
ports:
|
|
- "8123:8123"
|
|
- "9898:9898/udp"
|
|
- "4321:4321/udp"
|
|
- "51827:51827" #Homekit
|
|
depends_on:
|
|
- mysql
|
|
- mosquitto
|
|
- broadlink
|
|
network_mode: "host"
|
|
restart: always
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:8123"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 6
|
|
logging:
|
|
driver: json-file
|
|
options:
|
|
max-size: 50m
|
|
|
|
appdaemon:
|
|
image: monster1025/appdaemon
|
|
build:
|
|
context: ./appdaemon/docker
|
|
args:
|
|
BASE_IMAGE: dlashua/appdaemon:dev #acockburn/appdaemon:3.0.5
|
|
container_name: appdaemon
|
|
depends_on:
|
|
- hass
|
|
volumes:
|
|
- ./appdaemon/settings:/conf
|
|
- ./hass/settings/secrets.yaml:/conf/secrets.yaml:ro
|
|
- ./hass/settings/hosts.txt:/etc/hosts:ro
|
|
- /etc/localtime:/etc/localtime:ro
|
|
restart: always
|
|
links:
|
|
- "hass"
|
|
logging:
|
|
driver: json-file
|
|
options:
|
|
max-size: "10m"
|
|
max-file: "5"
|
|
|
|
nginx:
|
|
image: nginx
|
|
hostname: nginx
|
|
container_name: nginx
|
|
links:
|
|
- "hass"
|
|
- "appdaemon"
|
|
- "certbot"
|
|
env_file: ./nginx/settings/nginx.env
|
|
volumes:
|
|
- ./hass/settings/hosts.txt:/etc/hosts:ro
|
|
- ./nginx/settings/site-confs:/etc/nginx/conf.d.source:ro
|
|
- /srv/ssl:/config/keys
|
|
ports:
|
|
- "80:80"
|
|
- "443:443"
|
|
command: |
|
|
/bin/bash -c "cp -R /etc/nginx/conf.d.source/* /etc/nginx/conf.d && \
|
|
sed -i \"s/%DOMAIN%/$$HASS_DOMAIN/g\" /etc/nginx/conf.d/*.conf && \
|
|
sed -i \"s/%PASS%/$$HASS_PASSWORD/g\" /etc/nginx/conf.d/*.conf && \
|
|
sed -i \"s/%SERVER_IP%/$$SERVER_IP/g\" /etc/nginx/conf.d/*.conf && \
|
|
nginx -g 'daemon off;'"
|
|
restart: always
|
|
logging:
|
|
driver: json-file
|
|
options:
|
|
max-size: "10m"
|
|
max-file: "5"
|
|
|
|
certbot:
|
|
image: certbot/certbot
|
|
restart: always
|
|
container_name: certbot
|
|
volumes:
|
|
- ./certbot/docker/update_certs.sh:/update_certs.sh:ro
|
|
- /srv/ssl:/etc/letsencrypt
|
|
- /var/lib/letsencrypt:/var/lib/letsencrypt
|
|
- /etc/localtime:/etc/localtime:ro
|
|
ports:
|
|
- "8081:80"
|
|
entrypoint: ["/update_certs.sh"]
|
|
#command: certonly --standalone --agree-tos --standalone-supported-challenges http-01 --email admin@yandex5.ru -d home.yandex5.ru
|
|
logging:
|
|
driver: json-file
|
|
options:
|
|
max-size: "10m"
|
|
max-file: "5"
|
|
|
|
broadlink:
|
|
image: monster1025/broadlink
|
|
container_name: broadlink
|
|
links:
|
|
- "mosquitto"
|
|
env_file: ./broadlink/settings/broadlink.env
|
|
restart: always
|
|
logging:
|
|
driver: json-file
|
|
options:
|
|
max-size: 50m
|
|
|
|
zigbee2mqtt:
|
|
image: koenkk/zigbee2mqtt:latest-dev
|
|
container_name: zigbee2mqtt
|
|
volumes:
|
|
- ./zigbee2mqtt/settings:/app/data
|
|
devices:
|
|
- /dev/zigbee:/dev/ttyACM0
|
|
privileged: true
|
|
restart: always
|
|
logging:
|
|
driver: json-file
|
|
options:
|
|
max-size: 50m
|
|
###########################
|
|
# GRAFANA #
|
|
###########################
|
|
grafana:
|
|
image: grafana/grafana
|
|
container_name: grafana
|
|
volumes:
|
|
- "/srv/grafana:/var/lib/grafana"
|
|
environment:
|
|
- GF_SECURITY_ADMIN_PASSWORD=grafanapass
|
|
links:
|
|
- "mysql:mysql"
|
|
ports:
|
|
- "3000:3000"
|
|
restart: always
|
|
logging:
|
|
driver: json-file
|
|
options:
|
|
max-size: 50m
|
|
|
|
# networks:
|
|
# traefik:
|
|
# external:
|
|
# name: my-pre-existing-network
|