64 lines
1.8 KiB
YAML
64 lines
1.8 KiB
YAML
version: '3.8'
|
|
|
|
services:
|
|
# ESPHome service for managing device configurations
|
|
esphome:
|
|
image: esphome/esphome:latest
|
|
container_name: esphome
|
|
restart: unless-stopped
|
|
network_mode: host
|
|
volumes:
|
|
# Mount the config directory to access all device configs
|
|
- ./config:/config
|
|
# ESPHome cache and build artifacts
|
|
- esphome-cache:/cache
|
|
environment:
|
|
- ESPHOME_DASHBOARD_USE_PING=true
|
|
# ESPHome dashboard runs on port 6052
|
|
# Using host network mode for mDNS/Avahi discovery and OTA uploads
|
|
|
|
# Gitea sync service for synchronizing configs between Gitea and ESPHome
|
|
webhook:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
container_name: esphome-gitea-sync
|
|
restart: unless-stopped
|
|
ports:
|
|
- "5000:5000"
|
|
volumes:
|
|
# Share the same config directory with ESPHome (read-write for git operations)
|
|
- ./config:/config
|
|
environment:
|
|
# Configuration directory (local config subdirectory)
|
|
- ESPHOME_CONFIG_DIR=/config
|
|
|
|
# Debounce delay in seconds to prevent rapid repeated triggers
|
|
- DEBOUNCE_SECONDS=5
|
|
|
|
# Gitea repository configuration
|
|
- GITEA_URL=https://git.baumann.gr/
|
|
- GITEA_REPO=adebaumann/ESP-Home-Scripts
|
|
- GITEA_TOKEN=9254038f8f9863657f0015a9341dda4177e857bd
|
|
- GITEA_BRANCH=main
|
|
|
|
# Auto-push local changes to Gitea (default: false)
|
|
- AUTO_PUSH=false
|
|
|
|
# Git user configuration for commits
|
|
- GIT_USER_NAME=Adrian A. Baumann
|
|
- GIT_USER_EMAIL=ade@adebaumann.com
|
|
depends_on:
|
|
- esphome
|
|
# Optional: Uncomment to use host network if webhook needs access to local devices
|
|
# network_mode: host
|
|
|
|
volumes:
|
|
# Persistent volume for ESPHome build cache
|
|
esphome-cache:
|
|
driver: local
|
|
|
|
networks:
|
|
default:
|
|
name: esphome-network
|