mirror of
https://github.com/alexhopeoconnor/arduino-home-assistant.git
synced 2026-10-04 02:48:13 +10:00
45 lines
1.1 KiB
YAML
45 lines
1.1 KiB
YAML
services:
|
|
mqtt:
|
|
image: eclipse-mosquitto:2
|
|
command: ["mosquitto", "-c", "/mosquitto/config/mosquitto.conf"]
|
|
volumes:
|
|
- ./mosquitto.conf:/mosquitto/config/mosquitto.conf:ro
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "mosquitto_sub -h localhost -t '$$SYS/broker/version' -C 1 -W 5 >/dev/null 2>&1"]
|
|
interval: 3s
|
|
timeout: 5s
|
|
retries: 20
|
|
|
|
homeassistant:
|
|
image: ghcr.io/home-assistant/home-assistant:${HA_VERSION:-stable}
|
|
environment:
|
|
TZ: UTC
|
|
volumes:
|
|
- ha_config:/config
|
|
- ./configuration.yaml:/config/configuration.yaml:ro
|
|
depends_on:
|
|
mqtt:
|
|
condition: service_healthy
|
|
|
|
tests:
|
|
build:
|
|
context: ../..
|
|
dockerfile: tests/ha-contract/Dockerfile
|
|
environment:
|
|
HA_URL: http://homeassistant:8123
|
|
MQTT_HOST: mqtt
|
|
MQTT_PORT: "1883"
|
|
CONTRACT_MODE: ${CONTRACT_MODE:-migration}
|
|
CONTRACT_EXPECT_DISABLED_CLEANUP: ${CONTRACT_EXPECT_DISABLED_CLEANUP:-0}
|
|
volumes:
|
|
- contract_state:/state
|
|
depends_on:
|
|
mqtt:
|
|
condition: service_healthy
|
|
homeassistant:
|
|
condition: service_started
|
|
|
|
volumes:
|
|
ha_config:
|
|
contract_state:
|