forked from swingerman/ha-dual-smart-thermostat
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
65 lines (61 loc) · 1.97 KB
/
docker-compose.yml
File metadata and controls
65 lines (61 loc) · 1.97 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
version: '3.8'
services:
# Development service - for running tests, linting, and development commands
dev:
build:
context: .
dockerfile: Dockerfile.dev
args:
# Change this to test with specific Home Assistant versions
# Examples: 2025.1.0, 2025.2.0, latest
HA_VERSION: ${HA_VERSION:-2025.1.0}
PYTHON_VERSION: ${PYTHON_VERSION:-3.13}
image: dual-smart-thermostat:dev
container_name: dual_thermostat_dev
volumes:
# Mount source code for live editing
- .:/workspace:rw
# Mount config directory for Home Assistant
- ./config:/config:rw
# Cache directories to speed up subsequent runs
- pip-cache:/root/.cache/pip
- pytest-cache:/workspace/.pytest_cache
- mypy-cache:/workspace/.mypy_cache
working_dir: /workspace
environment:
- PYTHONPATH=/workspace
- PYTHONUNBUFFERED=1
# Disable pip warnings about running as root
- PIP_ROOT_USER_ACTION=ignore
# Keep container running for interactive use
stdin_open: true
tty: true
# Override with specific commands, e.g.:
# docker-compose run --rm dev pytest
# docker-compose run --rm dev bash scripts/lint
command: /bin/bash
# Optional: Home Assistant instance service for integration testing
homeassistant:
image: ghcr.io/home-assistant/home-assistant:${HA_VERSION:-2025.1}
container_name: dual_thermostat_homeassistant
volumes:
- ./config:/config:rw
# Mount the custom component directly into HA's custom_components directory
- ./custom_components/dual_smart_thermostat:/config/custom_components/dual_smart_thermostat:ro
ports:
- "8123:8123"
environment:
- TZ=UTC
restart: unless-stopped
volumes:
# Named volumes for caching
pip-cache:
driver: local
pytest-cache:
driver: local
mypy-cache:
driver: local
# Network configuration (default bridge network is sufficient for most use cases)
networks:
default:
driver: bridge