release v1.0
This commit is contained in:
@@ -0,0 +1,120 @@
|
||||
services:
|
||||
mariadb:
|
||||
container_name: mariadb
|
||||
image: mariadb:11
|
||||
restart: always
|
||||
environment:
|
||||
- MARIADB_ROOT_PASSWORD=Ant3na2021
|
||||
- TZ=Europe/Madrid
|
||||
ports:
|
||||
- "3307:3306"
|
||||
volumes:
|
||||
- mariadb_data:/var/lib/mysql
|
||||
- ./mariadb/init:/docker-entrypoint-initdb.d:ro
|
||||
- ./mariadb/conf.d/replication.cnf:/etc/mysql/mariadb.conf.d/99-replication.cnf:ro
|
||||
networks:
|
||||
- teknes-net
|
||||
|
||||
phpmyadmin:
|
||||
container_name: phpmyadmin
|
||||
image: phpmyadmin:latest
|
||||
restart: always
|
||||
# ports:
|
||||
# - "80:80"
|
||||
environment:
|
||||
- PMA_HOST=mariadb
|
||||
- PMA_PORT=3306
|
||||
- PMA_ABSOLUTE_URI=http://localhost/phpmyadmin/
|
||||
- TZ=Europe/Madrid
|
||||
depends_on:
|
||||
- mariadb
|
||||
networks:
|
||||
- teknes-net
|
||||
|
||||
nginx:
|
||||
container_name: nginx
|
||||
image: nginx:alpine
|
||||
restart: always
|
||||
extra_hosts:
|
||||
- "host.docker.internal:host-gateway"
|
||||
ports:
|
||||
- "80:80"
|
||||
volumes:
|
||||
- ./nginx/default.conf:/etc/nginx/conf.d/default.conf:ro
|
||||
depends_on:
|
||||
- phpmyadmin
|
||||
networks:
|
||||
- teknes-net
|
||||
|
||||
app-servidor-campo:
|
||||
container_name: app-servidor-campo
|
||||
build: ./app-servidor-campo
|
||||
init: true
|
||||
restart: on-failure
|
||||
ports:
|
||||
- "5566:5566"
|
||||
volumes:
|
||||
- ./app-servidor-campo/app:/home/teknes/ServidorCampo
|
||||
environment:
|
||||
- TZ=Europe/Madrid
|
||||
depends_on:
|
||||
- mariadb
|
||||
networks:
|
||||
- teknes-net
|
||||
|
||||
# mqtt:
|
||||
# container_name: mqtt
|
||||
# image: eclipse-mosquitto
|
||||
# restart: unless-stopped
|
||||
# network_mode: host
|
||||
# volumes:
|
||||
# - ./homeassistant/config_mqtt:/mosquitto/config
|
||||
# - ./homeassistant/data_mqtt:/mosquitto/data
|
||||
# - ./homeassistant/log_mqtt:/mosquitto/log
|
||||
# environment:
|
||||
# - TZ=Europe/Madrid
|
||||
|
||||
homeassistant:
|
||||
container_name: homeassistant
|
||||
image: ghcr.io/home-assistant/home-assistant:stable
|
||||
restart: always
|
||||
privileged: true
|
||||
network_mode: host
|
||||
volumes:
|
||||
- ./homeassistant/config_ha:/config
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
- /run/dbus:/run/dbus:ro
|
||||
- /opt/shutdown-signal:/shutdown-signal # Fichero de señal de apagado
|
||||
environment:
|
||||
- TZ=Europe/Madrid
|
||||
depends_on:
|
||||
# - mqtt
|
||||
- file-editor
|
||||
|
||||
file-editor:
|
||||
container_name: file-editor
|
||||
image: causticlab/hass-configurator-docker:latest
|
||||
restart: unless-stopped
|
||||
network_mode: host
|
||||
volumes:
|
||||
- ./homeassistant/config_file-editor:/config
|
||||
- ./homeassistant/config_ha:/hass-config
|
||||
environment:
|
||||
- TZ=Europe/Madrid
|
||||
|
||||
# node-red:
|
||||
# container_name: node-red
|
||||
# image: nodered/node-red:latest
|
||||
# restart: unless-stopped
|
||||
# network_mode: host
|
||||
# volumes:
|
||||
# - ./homeassistant/data_nodered:/data
|
||||
# environment:
|
||||
# - TZ=Europe/Madrid
|
||||
|
||||
volumes:
|
||||
mariadb_data:
|
||||
|
||||
networks:
|
||||
teknes-net:
|
||||
driver: bridge
|
||||
@@ -0,0 +1,148 @@
|
||||
# Loads default set of integrations. Do not remove.
|
||||
default_config:
|
||||
|
||||
http:
|
||||
use_x_forwarded_for: true
|
||||
trusted_proxies:
|
||||
- 172.18.0.0/16
|
||||
|
||||
panel_iframe:
|
||||
configurator:
|
||||
title: Configurator
|
||||
icon: mdi:wrench
|
||||
#url: http://192.168.1.220:3218
|
||||
url: http://ncie-benamira:54753
|
||||
|
||||
shell_command:
|
||||
trigger_shutdown: touch /shutdown-signal/apagar
|
||||
trigger_total_shutdown: touch /shutdown-signal/apagado_total
|
||||
trigger_startup: touch /shutdown-signal/encender
|
||||
|
||||
# zigbee2mqtt:
|
||||
# title: Zigbee2mqtt
|
||||
# icon: mdi:zigbee
|
||||
# #url: http://192.168.1.220:8080
|
||||
# url: http://teknes-instalacion.ddns.net:54754
|
||||
|
||||
#switch:
|
||||
# - platform: group
|
||||
# name: Instalacion
|
||||
# entities:
|
||||
# - switch.caja_instalacion
|
||||
#
|
||||
# - platform: group
|
||||
# name: Cajas
|
||||
# entities:
|
||||
# - switch.caja_eje1_pila1_204_210
|
||||
# - switch.caja_eje1_pila2_205_211
|
||||
# - switch.caja_eje1_pila3_201
|
||||
# - switch.caja_eje2_pila1_203_212
|
||||
# - switch.caja_eje2_pila2_206_213
|
||||
# - switch.caja_eje2_pila3_202
|
||||
|
||||
# - platform: mqtt
|
||||
# name: "Caja instalacion"
|
||||
# state_topic: "zigbee2mqtt/caja-instalacion/status"
|
||||
# command_topic: "zigbee2mqtt/caja-instalacion"
|
||||
# payload_on: "ON"
|
||||
# payload_off: "OFF"
|
||||
# qos: 0
|
||||
# retain: true
|
||||
# restore_state: true
|
||||
#
|
||||
# - platform: mqtt
|
||||
# name: "Caja eje1 pila1 204 210"
|
||||
# state_topic: "zigbee2mqtt/caja-eje1-pila1-204-210/status"
|
||||
# command_topic: "zigbee2mqtt/caja-eje1-pila1-204-210"
|
||||
# payload_on: "ON"
|
||||
# payload_off: "OFF"
|
||||
# qos: 0
|
||||
# retain: true
|
||||
# restore_state: true
|
||||
#
|
||||
# - platform: mqtt
|
||||
# name: "Caja eje1 pila2 205 211"
|
||||
# state_topic: "zigbee2mqtt/caja-eje1-pila2-205-211/status"
|
||||
# command_topic: "zigbee2mqtt/caja-eje1-pila2-205-211"
|
||||
# payload_on: "ON"
|
||||
# payload_off: "OFF"
|
||||
# qos: 0
|
||||
# retain: true
|
||||
# restore_state: true
|
||||
#
|
||||
# - platform: mqtt
|
||||
# name: "Caja eje1 pila3 201"
|
||||
# state_topic: "zigbee2mqtt/caja-eje1-pila3-201/status"
|
||||
# command_topic: "zigbee2mqtt/caja-eje1-pila3-201"
|
||||
# payload_on: "ON"
|
||||
# payload_off: "OFF"
|
||||
# qos: 0
|
||||
# retain: true
|
||||
# restore_state: true
|
||||
#
|
||||
# - platform: mqtt
|
||||
# name: "Caja eje2 pila1 203 212"
|
||||
# state_topic: "zigbee2mqtt/caja-eje2-pila1-203-212/status"
|
||||
# command_topic: "zigbee2mqtt/caja-eje2-pila1-203-212"
|
||||
# payload_on: "ON"
|
||||
# payload_off: "OFF"
|
||||
# qos: 0
|
||||
# retain: true
|
||||
# restore_state: true
|
||||
#
|
||||
# - platform: mqtt
|
||||
# name: "Caja eje2 pila2 206 213"
|
||||
# state_topic: "zigbee2mqtt/caja-eje2-pila2-206-213/status"
|
||||
# command_topic: "zigbee2mqtt/caja-eje2-pila2-206-213"
|
||||
# payload_on: "ON"
|
||||
# payload_off: "OFF"
|
||||
# qos: 0
|
||||
# retain: true
|
||||
# restore_state: true
|
||||
#
|
||||
# - platform: mqtt
|
||||
# name: "Caja eje2 pila3 202"
|
||||
# state_topic: "zigbee2mqtt/caja-eje2-pila3-202/status"
|
||||
# command_topic: "zigbee2mqtt/caja-eje2-pila3-202"
|
||||
# payload_on: "ON"
|
||||
# payload_off: "OFF"
|
||||
# qos: 0
|
||||
# retain: true
|
||||
# restore_state: true
|
||||
|
||||
#
|
||||
#telegram_bot:
|
||||
# - platform: polling
|
||||
# api_key: 6092066180:AAHJOCNkbjnNg5NUcEOL2kjLDKd7AFecu3s
|
||||
# allowed_chat_ids:
|
||||
# #335322529:sergio, 5735162:Iñigo
|
||||
# - 335322529
|
||||
# - 5735162
|
||||
|
||||
#mqtt:
|
||||
# discovery: true
|
||||
# #broker: mqtt://192.168.1.220
|
||||
# broker: mqtt://teknes-instalacion.ddns.net:54755
|
||||
# birth_message:
|
||||
# topic: 'homeassistant/status'
|
||||
# payload: 'online'
|
||||
# will_message:
|
||||
# topic: 'homeassistant/status'
|
||||
# payload: 'offline'
|
||||
|
||||
# Load frontend themes from the themes folder
|
||||
#frontend:
|
||||
#themes: !include_dir_merge_named themes
|
||||
|
||||
# Text to speech
|
||||
tts:
|
||||
- platform: google_translate
|
||||
|
||||
|
||||
api:
|
||||
|
||||
|
||||
|
||||
automation: !include automations.yaml
|
||||
script: !include scripts.yaml
|
||||
scene: !include scenes.yaml
|
||||
@@ -0,0 +1,13 @@
|
||||
[Unit]
|
||||
Description=Watcher de senal de apagado ordenado
|
||||
After=network.target docker.service
|
||||
Wants=docker.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/usr/local/sbin/shutdown-watcher.sh
|
||||
Restart=always
|
||||
RestartSec=5
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Reference in New Issue
Block a user