/
/
/
Ansible role that deploys a supervised home assistant installation on my homeassistant device.
1# {{ ansible_managed }}
2services:
3 {{ homeassistant_semaphore_container_name }}:
4 image: {{ homeassistant_semaphore_image }}:{{ homeassistant_semaphore_version }}
5 container_name: {{ homeassistant_semaphore_container_name }}
6 restart: unless-stopped
7 ports:
8 - '{{ homeassistant_semaphore_host_port }}:{{ homeassistant_semaphore_port }}'
9 environment:
10 SEMAPHORE_DB_DIALECT: sqlite
11 SEMAPHORE_ADMIN: "{{ homeassistant_semaphore_admin_user }}"
12 SEMAPHORE_ADMIN_NAME: "{{ homeassistant_semaphore_admin_name }}"
13 SEMAPHORE_ADMIN_EMAIL: "{{ homeassistant_semaphore_admin_email }}"
14 # Read by the image's server-wrapper and exported before startup
15 SEMAPHORE_ADMIN_PASSWORD_FILE: /run/secrets/semaphore/admin_password
16 SEMAPHORE_ACCESS_KEY_ENCRYPTION_FILE: /run/secrets/semaphore/access_key_encryption
17 TZ: "{{ system_timezone }}"
18 # Cron schedules are evaluated in UTC unless this is set
19 SEMAPHORE_SCHEDULE_TIMEZONE: "{{ system_timezone }}"
20 volumes:
21 - ./config:/etc/semaphore
22 - ./data:/var/lib/semaphore
23 - ./secrets:/run/secrets/semaphore:ro
24 mem_limit: {{ homeassistant_semaphore_memory_limit }}
25 healthcheck:
26 test: ["CMD", "curl", "-fsS", "http://localhost:{{ homeassistant_semaphore_port }}/api/ping"]
27 interval: 30s
28 timeout: 10s
29 retries: 3
30 start_period: 60s
31