From 4153e8e8a86e225cd08993486b1d285df2acf3f9 Mon Sep 17 00:00:00 2001 From: GSRN Date: Mon, 1 Sep 2025 10:14:19 +0200 Subject: [PATCH] Update README.md with new service details, add healthcheck improvements for Immich, and remove deprecated Watchtower service configuration. --- .gitignore | 1 + README.md | 65 +++++-- WUD/compose.yaml | 10 ++ docker-compose.yml | 359 ++++++++++++++++++++++++++++++++++++++ immich/docker-compose.yml | 10 +- manage.sh | 195 +++++++++++++++++++++ watchtower/compose.yaml | 35 ---- 7 files changed, 620 insertions(+), 55 deletions(-) create mode 100644 .gitignore create mode 100644 WUD/compose.yaml create mode 100644 docker-compose.yml create mode 100644 manage.sh delete mode 100644 watchtower/compose.yaml diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..845959d --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +**/.env \ No newline at end of file diff --git a/README.md b/README.md index 103c23e..826f963 100644 --- a/README.md +++ b/README.md @@ -4,17 +4,18 @@ A collection of Docker services for a home lab environment. ## Port Matrix -| Service | 80 | 81 | 222 | 2283 | 3000 | 5000 | 5540 | 5678 | 6379 | 8001 | 8554 | 8555 | 8971 | 9000 | 9443 | 27017 | -|---------|----|----|----|----|----|----|----|----|----|----|----|----|----|----|----|----| -| πŸ”₯ Firefly III | βœ… | βœ… | | | | | | | | | | | | | | | -| πŸ“Ή Frigate | | | | | | βœ… | | | | | βœ… | βœ… | βœ… | | | | -| πŸ™ Gitea | | | βœ… | | βœ… | | | | | | | | | | | | -| πŸ“± Immich | | | | βœ… | | | | | | | | | | | | | -| πŸƒ MongoDB | | | | | | | | | | | | | | | | βœ… | -| πŸ”„ n8n | | | | | | | | βœ… | | | | | | | | | -| 🐳 Portainer | | | | | | | | | | | | | | | βœ… | βœ… | -| πŸ”΄ Redis | | | | | | | βœ… | | βœ… | | | | | | | | -| πŸ—ΊοΈ WebMap | | | | | | | | | | βœ… | | | | | | | +| Service | 80 | 81 | 222 | 2283 | 3000 | 5000 | 5540 | 5678 | 6379 | 8001 | 8554 | 8555 | 8971 | 9000 | 9443 | 9999 | 27017 | +|---------|----|----|----|----|----|----|----|----|----|----|----|----|----|----|----|----|----|----| +| πŸ”₯ Firefly III | βœ… | βœ… | | | | | | | | | | | | | | | | +| πŸ“Ή Frigate | | | | | | βœ… | | | | | βœ… | βœ… | βœ… | | | | | +| πŸ™ Gitea | | | βœ… | | βœ… | | | | | | | | | | | | | +| πŸ“± Immich | | | | βœ… | | | | | | | | | | | | | | +| πŸƒ MongoDB | | | | | | | | | | | | | | | | | βœ… | +| πŸ”„ n8n | | | | | | | | βœ… | | | | | | | | | | +| 🐳 Portainer | | | | | | | | | | | | | | βœ… | βœ… | | | +| πŸ”΄ Redis | | | | | | | βœ… | | βœ… | | | | | | | | | +| πŸ“Š What's Up Docker | | | | | | | | | | | | | | | | βœ… | | +| πŸ—ΊοΈ WebMap | | | | | | | | | | βœ… | | | | | | | | ## Services @@ -23,8 +24,9 @@ A collection of Docker services for a home lab environment. **Description:** Personal finance manager with budgeting, expense tracking, and financial insights. Includes data import capabilities and automated cron jobs for recurring transactions. ### πŸ“Ή Frigate -**Ports:** 8971, 5000, 8554, 8555 -**Description:** NVR (Network Video Recorder) with real-time object detection using AI. Supports RTSP cameras, USB Coral TPU for hardware acceleration, and provides web interface for monitoring. +**Ports:** 8971 (Web UI), 5000 (Internal API), 8554 (RTSP), 8555 (WebRTC) +**Description:** AI-powered NVR with real-time object detection using USB Coral TPU. Features face recognition, license plate recognition, and motion detection with custom zones. +**Configuration:** 3 cameras (achtertuin, tuinhuis, carport) via NVR at 192.168.2.26. MQTT integration with Home Assistant for automation. Recording strategy: motion/detection clips retained for 3 days, no continuous recording. ### πŸ™ Gitea **Ports:** 3000 (Web), 222 (SSH) @@ -32,7 +34,8 @@ A collection of Docker services for a home lab environment. ### πŸ“± Immich **Ports:** 2283 -**Description:** Self-hosted photo and video backup solution with machine learning capabilities. Features automatic organization, face recognition, and mobile app support. +**Description:** Self-hosted photo and video backup solution with machine learning capabilities. Features automatic organization, face recognition, and mobile app support. +**Notes:** Healthcheck uses bash TCP probe on `localhost:2283`. Database is optimized for HDD with `DB_STORAGE_TYPE: 'HDD'`. ### πŸƒ MongoDB **Ports:** 27017 @@ -50,8 +53,10 @@ A collection of Docker services for a home lab environment. **Ports:** 6379 (Redis), 5540 (RedisInsight) **Description:** In-memory data structure store with RedisInsight for database management and monitoring. Used as cache, message broker, and session store. -### πŸ‘€ Watchtower -**Description:** Automated Docker container updater that monitors running containers and automatically updates them to the latest available image versions. +### πŸ“Š What's Up Docker +**Ports:** 9999 +**Description:** Web-based container update monitoring tool that tracks available updates for Docker containers. Provides a dashboard to view outdated containers and sends notifications via webhooks. +**Notes:** Webhook configured to send update notifications to external endpoint. ### πŸ—ΊοΈ WebMap **Ports:** 8001 @@ -59,13 +64,39 @@ A collection of Docker services for a home lab environment. ## Getting Started -Each service is contained in its own directory with a `compose.yaml` file. To start a service: +### Option 1: Single Command (Recommended) +Start all services with one command: + +```bash +# Start all services +docker-compose up -d + +# Or use the management script +./manage.sh start +``` + +### Option 2: Individual Services +Each service is contained in its own directory with a `compose.yaml` file: ```bash cd docker-compose up -d ``` +### Management Script +Use the included `manage.sh` script for easy management: + +```bash +./manage.sh start # Start all services +./manage.sh stop # Stop all services +./manage.sh restart # Restart all services +./manage.sh status # Show service status +./manage.sh logs [service] # View logs +./manage.sh update # Update and restart +./manage.sh backup # Backup data volumes +./manage.sh clean # Clean up unused resources +``` + ## Requirements - Docker and Docker Compose diff --git a/WUD/compose.yaml b/WUD/compose.yaml new file mode 100644 index 0000000..dd56df2 --- /dev/null +++ b/WUD/compose.yaml @@ -0,0 +1,10 @@ +services: + whatsupdocker: + image: getwud/wud + container_name: wud + volumes: + - /var/run/docker.sock:/var/run/docker.sock + ports: + - 9999:3000 + environment: + - WUD_TRIGGER_HTTP_MYREMOTEHOST_URL=https://satisfhome.duckdns.org/webhook/4865569a-ceb7-4d46-8c69-a50e39b8fa6d diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..972c0f9 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,359 @@ +version: '3.8' + +services: + # Firefly III + firefly-app: + image: fireflyiii/core:latest + hostname: app + container_name: firefly_iii_core + networks: + - firefly_iii + restart: always + volumes: + - firefly_iii_upload:/var/www/html/storage/upload + env_file: ./firefly/.env + ports: + - '80:8080' + depends_on: + - firefly-db + healthcheck: + test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:8080/api/v1/about"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 60s + + firefly-db: + image: mariadb:lts + hostname: db + container_name: firefly_iii_db + networks: + - firefly_iii + restart: always + env_file: ./firefly/.db.env + volumes: + - firefly_iii_db:/var/lib/mysql + healthcheck: + test: ["CMD", "mysqladmin", "ping", "-h", "localhost"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 40s + + firefly-importer: + image: fireflyiii/data-importer:latest + hostname: importer + restart: always + container_name: firefly_iii_importer + networks: + - firefly_iii + ports: + - '81:8080' + depends_on: + - firefly-app + env_file: ./firefly/.importer.env + healthcheck: + test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:8080/health"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 40s + + firefly-cron: + image: alpine + container_name: firefly_iii_cron + restart: always + command: sh -c " + apk add tzdata + && ln -s /usr/share/zoneinfo/${TZ} /etc/localtime + | echo \"0 3 * * * wget -qO- http://app:8080/api/v1/cron/HcguQHJQpjR38uLfred;echo\" + | crontab - + && crond -f -L /dev/stdout" + networks: + - firefly_iii + + # Frigate + frigate: + container_name: frigate + restart: unless-stopped + stop_grace_period: 30s + image: ghcr.io/blakeblackshear/frigate:stable + shm_size: "512mb" + devices: + - /dev/bus/usb:/dev/bus/usb + volumes: + - /etc/localtime:/etc/localtime:ro + - ./frigate/config:/config + - ./frigate/storage:/media/frigate + - type: tmpfs + target: /tmp/cache + tmpfs: + size: 3000000000 + ports: + - "8971:8971" + - "5000:5000" + - "8554:8554" + - "8555:8555/tcp" + - "8555:8555/udp" + environment: + FRIGATE_RTSP_PASSWORD: "password" + healthcheck: + test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:5000/api/version"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 60s + + # Gitea + gitea-server: + image: docker.gitea.com/gitea:latest + container_name: gitea + environment: + - USER_UID=1000 + - USER_GID=1000 + - GITEA__database__DB_TYPE=postgres + - GITEA__database__HOST=gitea-db:5432 + - GITEA__database__NAME=gitea + - GITEA__database__USER=gitea + - GITEA__database__PASSWD=gitea + restart: always + networks: + - gitea + volumes: + - ./gitea/gitea:/data + - /etc/timezone:/etc/timezone:ro + - /etc/localtime:/etc/localtime:ro + ports: + - "3000:3000" + - "222:22" + depends_on: + - gitea-db + + gitea-db: + image: docker.io/library/postgres:14 + restart: always + environment: + - POSTGRES_USER=gitea + - POSTGRES_PASSWORD=gitea + - POSTGRES_DB=gitea + networks: + - gitea + volumes: + - ./gitea/postgres:/var/lib/postgresql/data + + # Immich + immich-server: + container_name: immich_server + image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release} + volumes: + - ${UPLOAD_LOCATION}:/data + - /etc/localtime:/etc/localtime:ro + env_file: + - ./immich/.env + ports: + - '2283:2283' + depends_on: + - immich-redis + - immich-database + restart: unless-stopped + healthcheck: + test: ["CMD-SHELL", "timeout 1 bash -c ' + redis-server + --requirepass Olenoob2209 + --appendonly yes + ports: + - "6379:6379" + volumes: + - redis-data:/data + environment: + - REDIS_PASSWORD=Olenoob2209 + networks: + - redis-net + healthcheck: + test: ["CMD", "redis-cli", "-a", "Olenoob2209", "ping"] + interval: 10s + timeout: 3s + retries: 5 + start_period: 5s + + redisinsight: + image: redislabs/redisinsight:2.70 + container_name: redisinsight + restart: unless-stopped + ports: + - "5540:5540" + networks: + - redis-net + volumes: + - redisinsight-data:/db + + # What's Up Docker + whatsupdocker: + image: getwud/wud + container_name: wud + volumes: + - /var/run/docker.sock:/var/run/docker.sock + ports: + - 9999:3000 + environment: + - WUD_TRIGGER_HTTP_MYREMOTEHOST_URL=https://satisfhome.duckdns.org/webhook/4865569a-ceb7-4d46-8c69-a50e39b8fa6d + + # WebMap + nmap: + image: instrumentisto/nmap + container_name: nmap + command: -sT -A -T3 -oX tmp/myscan.xml 192.168.2.0/24 + cap_add: + - NET_ADMIN + volumes: + - ./webmap/webmap:/tmp + network_mode: host + environment: + - PUID=1000 + - PGID=100 + + webmap: + container_name: webmap + hostname: webmap + ports: + - '8001:8000' + volumes: + - ./webmap/webmap:/opt/xml + image: reborntc/webmap + environment: + - PUID=1000 + - PGID=100 + restart: unless-stopped + healthcheck: + test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:8000"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 40s + +volumes: + firefly_iii_upload: + firefly_iii_db: + immich-model-cache: + mongodb-data: + n8n-data: + portainer-data: + redis-data: + redisinsight-data: + +networks: + firefly_iii: + driver: bridge + gitea: + driver: bridge + redis-net: + driver: bridge \ No newline at end of file diff --git a/immich/docker-compose.yml b/immich/docker-compose.yml index 74f7d1e..2430474 100644 --- a/immich/docker-compose.yml +++ b/immich/docker-compose.yml @@ -29,11 +29,13 @@ services: - database restart: unless-stopped healthcheck: - test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:2283/health"] + test: ["CMD-SHELL", "timeout 1 bash -c ' - generic+http://192.168.2.158:8123/api/webhook/-skoZVzhPaZcecNZaigi9Np1B?template=json - WATCHTOWER_NOTIFICATION_TEMPLATE: | - {"title":"Watchtower","message":" - {{- if .Report -}} - {{- with .Report -}} - {{len .Scanned}} Scanned, {{len .Updated}} Updated, {{len .Failed}} Failed - {{- range .Updated}} - - {{.Name}} ({{.ImageName}}): {{.CurrentImageID.ShortID}} updated to {{.LatestImageID.ShortID}} - {{- end -}} - {{- range .Fresh}} - - {{.Name}} ({{.ImageName}}): {{.State}} - {{- end -}} - {{- range .Skipped}} - - {{.Name}} ({{.ImageName}}): {{.State}}: {{.Error}} - {{- end -}} - {{- range .Failed}} - - {{.Name}} ({{.ImageName}}): {{.State}}: {{.Error}} - {{- end -}} - {{- end -}} - {{- else -}} - {{range .Entries -}}{{.Message}}\n{{- end -}} - {{- end -}}" - }