homelab_automation/docker/docker-compose.yml
Bruno Charest 05087aa380
Some checks failed
Tests / Backend Tests (Python) (3.10) (push) Has been cancelled
Tests / Backend Tests (Python) (3.11) (push) Has been cancelled
Tests / Backend Tests (Python) (3.12) (push) Has been cancelled
Tests / Frontend Tests (JS) (push) Has been cancelled
Tests / Integration Tests (push) Has been cancelled
Tests / All Tests Passed (push) Has been cancelled
Replace manual upsert logic with SQLite native upsert in Docker CRUD repositories, enhance Ansible backup playbook with better error handling and file permissions, add favicon endpoint, and improve playbook editor UI with syntax highlighting, lint integration, quality badges, and enhanced code editing features
2025-12-17 15:36:49 -05:00

60 lines
2.1 KiB
YAML

---
services:
homelab-dashboard:
image: docker-registry.dev.home:5000/homelab-automation-api:latest
container_name: homelab-dashboard
restart: unless-stopped
ports:
- "${PORT:-7070}:8008"
environment:
# general variables
- TZ=${TZ:-America/Montreal}
# application variables
- API_KEY=${API_KEY:-dev-key-12345}
- SSH_USER=${SSH_USER:-automation}
- SSH_KEY_PATH=${SSH_KEY_PATH:-/app/ssh_keys/id_automation_ansible}
- HOMELAB_DATA_DIR=/app/data
- DB_PATH=/app/data/homelab.db
- DATABASE_URL=${DATABASE_URL:-sqlite+aiosqlite:////app/data/homelab.db}
- JWT_SECRET_KEY=${JWT_SECRET_KEY:-dev-key-12345}
- JWT_EXPIRE_MINUTES=${JWT_EXPIRE_MINUTES:-1440}
# ntfy notification variables
- NTFY_BASE_URL=${NTFY_BASE_URL:-https://ntfy.dracodev.net}
- NTFY_DEFAULT_TOPIC=${NTFY_DEFAULT_TOPIC:-homelab-events}
- NTFY_ENABLED=${NTFY_ENABLED:-true}
- NTFY_MSG_TYPE=${NTFY_MSG_TYPE:-ERR}
- NTFY_TIMEOUT=${NTFY_TIMEOUT:-5}
# ansible variables
- ANSIBLE_HOST_KEY_CHECKING=False
- ANSIBLE_TIMEOUT=30
- ANSIBLE_INVENTORY=/app/ansible/inventory
- ANSIBLE_PLAYBOOKS=/app/ansible/playbooks
- ANSIBLE_GROUP_VARS=/app/ansible/inventory/group_vars
- DIR_LOGS_TASKS=/app/tasks_logs
volumes:
- ${SSH_KEY_DIR:-~/.ssh}:/app/ssh_keys:ro
- ${HOMELAB_DATA_DIR:-./data}:/app/data
- ${ANSIBLE_INVENTORY:-./ansible/inventory}:/app/ansible/inventory
- ${ANSIBLE_PLAYBOOKS:-./ansible/playbooks}:/app/ansible/playbooks
- ${ANSIBLE_GROUP_VARS:-./ansible/inventory/group_vars}:/app/ansible/inventory/group_vars
- ${HOMELAB_LOG_DIR:-./logs}:/app/logs
- ${DIR_LOGS_TASKS:-./tasks_logs}:/app/tasks_logs
networks:
- homelab-network
healthcheck:
test: ["CMD", "curl", "-f", "http://homelab-dashboard:7070/api/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
networks:
homelab-network:
driver: bridge
volumes:
homelab_data:
driver: local
homelab_logs:
driver: local