Skip to content
Snippets Groups Projects
Commit de7ba3ea authored by 3d's avatar 3d
Browse files

fixes for deploying hix

parent 4c62697e
No related branches found
No related tags found
No related merge requests found
......@@ -10,7 +10,7 @@ services:
- "443:443"
{% if matrix_federation is defined and matrix_federation == true %} - "8448:8448"
{% endif %}
- "{{ int_ip4 }}:8080:8080"
- "{{ int_ip4 }}:8081:8080"
volumes:
- "/srv/traefik/traefik.yml:/etc/traefik/traefik.yml:ro"
- "/srv/traefik/dynamic:/etc/traefik/dynamic:ro"
......
......@@ -5,7 +5,7 @@ services:
app:
image: linuxserver/unifi-controller:7.2.95
image: linuxserver/unifi-controller:7.3.83
restart: always
ports:
- 8443:8443
......
---
- include: ../functions/get_secret.yml
with_items:
- { path: "{{ basedir }}/homeassistant_admin_password", length: 12 }
- { path: "{{ basedir }}/influxdb_password", length: 12 }
- { path: "{{ basedir }}/influxdb_token", length: 32 }
- name: "create folder struct for {{ basedir }}"
file:
path: "{{ item }}"
state: "directory"
with_items:
- "{{ basedir }}"
- "{{ basedir }}/config/"
- name: "copy config files for {{ basedir }}"
template:
src: "{{ item }}"
dest: "{{ basedir }}/{{ item }}"
with_items:
- docker-compose.yml
- config/configuration.yaml
register: config_files
- name: "stop {{ servicename }} docker"
docker_compose:
project_src: "{{ basedir }}"
state: absent
when: config_files.changed
- name: "start {{ servicename }} docker"
docker_compose:
project_src: "{{ basedir }}"
state: present
# Loads default set of integrations. Do not remove.
default_config:
# includes
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
# Load frontend themes from the themes folder
frontend:
themes: !include_dir_merge_named themes
# https://www.home-assistant.io/docs/configuration/basic/
homeassistant:
name: "warpzone"
latitude: 51.944514
longitude: 7.638933
elevation: 70
unit_system: metric
currency: EUR
country: DE
time_zone: Europe/Berlin
internal_url: https://{{ domain }}
auth_providers:
- type: trusted_networks
trusted_networks:
- 10.0.0.0/22
- 192.168.0.0/24
allow_bypass_login: true
- type: homeassistant
# https://www.home-assistant.io/integrations/http/
http:
server_port: 8123
ip_ban_enabled: False
login_attempts_threshold: 10
use_x_forwarded_for: true
trusted_proxies:
- 172.0.0.0/8
# https://www.home-assistant.io/integrations/logger
# log_level= critical, fatal, error, warning, warn, info, debug, notset
logger:
default: info
# https://www.home-assistant.io/integrations/influxdb/
influxdb:
api_version: 2
host: influxdb
port: 8086
ssl: false
organization: homeassistant
bucket: homeassistant
token: {{ influxdb_token }}
default_measurement: units
## Automatisierungen ################################################################
version: "3"
services:
app:
image: homeassistant/home-assistant:2023.1
restart: always
volumes:
- "/etc/localtime:/etc/localtime:ro"
- "{{ basedir }}/config:/config"
environment:
TZ: "Europe/Berlin"
labels:
- traefik.enable=true
- traefik.http.routers.{{ servicename }}.rule=Host(`{{ domain }}`)
- traefik.http.routers.{{ servicename }}.entrypoints=websecure
- traefik.http.services.{{ servicename }}.loadbalancer.server.port=8123
networks:
- default
- web
influxdb:
image: influxdb:2.6.0
restart: always
ports:
- "{{ int_ip4 }}:{{ influxdb_port }}:8086"
volumes:
- "{{ basedir }}/influxdb:/var/lib/influxdb2"
environment:
DOCKER_INFLUXDB_INIT_MODE: setup
DOCKER_INFLUXDB_INIT_USERNAME: homeassistant
DOCKER_INFLUXDB_INIT_PASSWORD: {{ influxdb_password }}
DOCKER_INFLUXDB_INIT_ORG: homeassistant
DOCKER_INFLUXDB_INIT_BUCKET: homeassistant
DOCKER_INFLUXDB_INIT_ADMIN_TOKEN: {{ influxdb_token }}
networks:
- default
networks:
web:
external: true
......@@ -330,7 +330,7 @@
mqtt_influxdb_port: 18086
}
- {
role: intern/docker_homeassistant, tags: homeassistant,
role: remote/docker_homeassistant, tags: homeassistant,
servicename: homeassistant,
basedir: /srv/homeassistant,
domain: "ha.warpzone.remote",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment