fix(deployments): add HOMELAB_DATA_DIR support to homelab-secure

Update docker-compose.homelab-secure.yml to use HOMELAB_DATA_DIR
environment variable with fallback to data/homelab for all volume mounts.
This commit is contained in:
Jeremie Fraeys 2026-02-24 11:43:38 -05:00
parent 5691b06876
commit 3ff5ef320a
No known key found for this signature in database

View file

@ -11,9 +11,9 @@ services:
- "9101:9101" - "9101:9101"
- "9100:9100" # Prometheus metrics endpoint - "9100:9100" # Prometheus metrics endpoint
volumes: volumes:
- ${FETCHML_REPO_ROOT:-..}/data/homelab/experiments:/data/experiments - ${HOMELAB_DATA_DIR:-${FETCHML_REPO_ROOT:-..}/data/homelab}/experiments:/data/experiments
- ${FETCHML_REPO_ROOT:-..}/data/homelab/active:/data/active - ${HOMELAB_DATA_DIR:-${FETCHML_REPO_ROOT:-..}/data/homelab}/active:/data/active
- ${FETCHML_REPO_ROOT:-..}/data/homelab/logs:/logs - ${HOMELAB_DATA_DIR:-${FETCHML_REPO_ROOT:-..}/data/homelab}/logs:/logs
- ${FETCHML_REPO_ROOT:-..}/ssl:/app/ssl:ro - ${FETCHML_REPO_ROOT:-..}/ssl:/app/ssl:ro
- ${FETCHML_REPO_ROOT:-..}/configs/api/homelab-secure.yaml:/app/configs/api/prod.yaml:ro - ${FETCHML_REPO_ROOT:-..}/configs/api/homelab-secure.yaml:/app/configs/api/prod.yaml:ro
- ${FETCHML_REPO_ROOT:-..}/.env.secure:/app/.env.secure:ro - ${FETCHML_REPO_ROOT:-..}/.env.secure:/app/.env.secure:ro
@ -47,7 +47,7 @@ services:
- "9000:9000" - "9000:9000"
- "9001:9001" - "9001:9001"
volumes: volumes:
- ${FETCHML_REPO_ROOT:-..}/data/homelab/minio:/data - ${HOMELAB_DATA_DIR:-${FETCHML_REPO_ROOT:-..}/data/homelab}/minio:/data
environment: environment:
- MINIO_ROOT_USER=${MINIO_ROOT_USER:-minioadmin} - MINIO_ROOT_USER=${MINIO_ROOT_USER:-minioadmin}
- MINIO_ROOT_PASSWORD=${MINIO_ROOT_PASSWORD:-minioadmin123} - MINIO_ROOT_PASSWORD=${MINIO_ROOT_PASSWORD:-minioadmin123}
@ -84,9 +84,9 @@ services:
dockerfile: ${FETCHML_REPO_ROOT:-..}/build/docker/simple.Dockerfile dockerfile: ${FETCHML_REPO_ROOT:-..}/build/docker/simple.Dockerfile
container_name: ml-experiments-worker container_name: ml-experiments-worker
volumes: volumes:
- ${FETCHML_REPO_ROOT:-..}/data/homelab/experiments:/app/data/experiments - ${HOMELAB_DATA_DIR:-${FETCHML_REPO_ROOT:-..}/data/homelab}/experiments:/app/data/experiments
- ${FETCHML_REPO_ROOT:-..}/data/homelab/active:/data/active - ${HOMELAB_DATA_DIR:-${FETCHML_REPO_ROOT:-..}/data/homelab}/active:/data/active
- ${FETCHML_REPO_ROOT:-..}/data/homelab/logs:/logs - ${HOMELAB_DATA_DIR:-${FETCHML_REPO_ROOT:-..}/data/homelab}/logs:/logs
- ${FETCHML_REPO_ROOT:-..}/configs/workers/homelab-secure.yaml:/app/configs/worker.yaml - ${FETCHML_REPO_ROOT:-..}/configs/workers/homelab-secure.yaml:/app/configs/worker.yaml
depends_on: depends_on:
redis: redis:
@ -116,8 +116,8 @@ services:
volumes: volumes:
- ${FETCHML_REPO_ROOT:-..}/deployments/Caddyfile.homelab-secure:/etc/caddy/Caddyfile:ro - ${FETCHML_REPO_ROOT:-..}/deployments/Caddyfile.homelab-secure:/etc/caddy/Caddyfile:ro
- ${FETCHML_REPO_ROOT:-..}/ssl:/etc/caddy/ssl:ro - ${FETCHML_REPO_ROOT:-..}/ssl:/etc/caddy/ssl:ro
- ${FETCHML_REPO_ROOT:-..}/data/homelab/caddy/data:/data - ${HOMELAB_DATA_DIR:-${FETCHML_REPO_ROOT:-..}/data/homelab}/caddy/data:/data
- ${FETCHML_REPO_ROOT:-..}/data/homelab/caddy/config:/config - ${HOMELAB_DATA_DIR:-${FETCHML_REPO_ROOT:-..}/data/homelab}/caddy/config:/config
environment: environment:
- FETCHML_DOMAIN=${FETCHML_DOMAIN:-ml.local} - FETCHML_DOMAIN=${FETCHML_DOMAIN:-ml.local}
depends_on: depends_on:
@ -134,7 +134,7 @@ services:
ports: ports:
- "127.0.0.1:6379:6379" # Bind to localhost only - "127.0.0.1:6379:6379" # Bind to localhost only
volumes: volumes:
- ${FETCHML_REPO_ROOT:-..}/data/homelab/redis:/data - ${HOMELAB_DATA_DIR:-${FETCHML_REPO_ROOT:-..}/data/homelab}/redis:/data
- ${FETCHML_REPO_ROOT:-..}/redis/redis-secure.conf:/usr/local/etc/redis/redis.conf:ro - ${FETCHML_REPO_ROOT:-..}/redis/redis-secure.conf:/usr/local/etc/redis/redis.conf:ro
restart: unless-stopped restart: unless-stopped
command: redis-server /usr/local/etc/redis/redis.conf --requirepass ${REDIS_PASSWORD} command: redis-server /usr/local/etc/redis/redis.conf --requirepass ${REDIS_PASSWORD}