ajnart / homarr

Customizable browser's home page to interact with your homeserver's Docker containers (e.g. Sonarr/Radarr)
https://homarr.dev
MIT License
5.52k stars 255 forks source link

Add Environment Variables for CONFIGS_PATH & ICONS_PATH #1446

Open oben01 opened 9 months ago

oben01 commented 9 months ago

Description

Thank you for all your hard work and commitment to making Homarr an exceptional open-source project. I'd like to mention that I am using Homarr in a homelab environment, where it has proven to be a valuable tool for my personal projects and experimentation.

I propose adding support for environment variables in the project's configuration, specifically enabling the setting of environment variable paths to volumes from Kubernetes. This enhancement would allow users and deployers to configure the project dynamically based on their specific deployment environment and easily link environment variables to Kubernetes volumes.

Environment Variables to add :

CONFIGS_PATH: This environment variable would represent the path to the configuration files, linked to a Kubernetes volume. ICONS_PATH: This environment variable would represent the path to the icons directory, linked to a Kubernetes volume.

The addition of environment variables linked to Kubernetes volumes will enhance the usability and flexibility of the project, making it easier for users to deploy and configure the project in various environments, including homelabs and Kubernetes clusters.

Kubernetes manifest example :

apiVersion: v1
kind: Pod
metadata:
  name: homarr-pod
spec:
  containers:
    - name: homarr
      image: ghcr.io/ajnart/homarr:latest
      ports:
        - containerPort: 7575
      volumeMounts:
        - name: configs-volume
          mountPath: /app/data/configs
        - name: icons-volume
          mountPath: /app/public/icons
  volumes:
    - name: configs-volume
      hostPath:
        path: /your-host-path/homarr/configs
    - name: icons-volume
      hostPath:
        path: /your-host-path/homarr/icons

Your feedback and input on this proposal are highly appreciated. Thank you for your attention to this request, and thank you once again for your outstanding work on Homarr.

Priority

Medium (Would be very useful)

manuel-rw commented 9 months ago

Hello, thank you for this request. @Meierschlumpf and @ajnart , what do you think about this? This should be doable using the env validation script, right? Perhaps it would also make sense to allow the same for the database (upcoming authentication).

github-actions[bot] commented 6 months ago

Hello 👋, this issue has been open for 60 without activity. Please close this issue if it's no longer relevant or has been resolved. Still relevant? Simply reply and I'll mark it as active.