msryhajw Posted February 12 Share Posted February 12 (edited) I am using Homepage docker container and have it all setup but do not want to expose API credentials clear text - I have created an env file to load these at docker runtime using –env-file .env - is it possible to use this in the docker setup in Unraid as although I can set variable I have 30 or so to maintain. I refererence for the setup I am testing. Thanks in Advance for any help Edited February 12 by msryhajw Quote Link to comment
blinkito Posted March 25 Share Posted March 25 Hi mate, did you manage to get it working? I'm having the same issue, don't know exactly how to manage that .env file on the Unraid Docker GUI. Thnx in advance. Quote Link to comment
SlavSquat Posted March 28 Share Posted March 28 Got it working just now, also setting up homepage. First, you will need to create that .env file. In the docker tab, click on "Homepage" then edit. Toggle the "basic view" switch to go into "Advanced view". In "Extra parameters", add this (change the actual path to your .env file) --env-file /mnt/cache/appdata/homepage/.env Click "Done" and it should now destroy the old container and recreate it. You should see the extra param (last line) added to the docker run, like so docker run -d --name='homepage' -l net.unraid.docker.managed=dockerman -l net.unraid.docker.webui='http://[IP]:[PORT:3000]' -l net.unraid.docker.icon='https://raw.githubusercontent.com/gethomepage/homepage/main/public/android-chrome-512x512.png' -v '/mnt/cache/appdata/homepage/config/':'/app/config':'rw' -v '/var/run/docker.sock':'/var/run/docker.sock':'ro' -v '/mnt/user/appdata/homepage/icons/':'/app/public/icons':'rw' --env-file /mnt/cache/appdata/homepage/.env 'ghcr.io/gethomepage/homepage:latest' Please be aware that if you make any changes to the env file once the container has been loaded, you will need to re-create it. Stopping & starting or restarting the container will not change the env file. The easiest way I found to force UnRAID to recreate the container with the new contents of the env file was to go into edit, change the "console shell command" from whatever it is set to the other and then hitting "Done". Once you're happy with your env file, revert back the console shell command to "shell" Happy setup 😄 1 Quote Link to comment
Bilbs84 Posted April 20 Share Posted April 20 On 3/29/2024 at 9:22 AM, SlavSquat said: Got it working just now, also setting up homepage. First, you will need to create that .env file. In the docker tab, click on "Homepage" then edit. Toggle the "basic view" switch to go into "Advanced view". In "Extra parameters", add this (change the actual path to your .env file) --env-file /mnt/cache/appdata/homepage/.env Click "Done" and it should now destroy the old container and recreate it. You should see the extra param (last line) added to the docker run, like so docker run -d --name='homepage' -l net.unraid.docker.managed=dockerman -l net.unraid.docker.webui='http://[IP]:[PORT:3000]' -l net.unraid.docker.icon='https://raw.githubusercontent.com/gethomepage/homepage/main/public/android-chrome-512x512.png' -v '/mnt/cache/appdata/homepage/config/':'/app/config':'rw' -v '/var/run/docker.sock':'/var/run/docker.sock':'ro' -v '/mnt/user/appdata/homepage/icons/':'/app/public/icons':'rw' --env-file /mnt/cache/appdata/homepage/.env 'ghcr.io/gethomepage/homepage:latest' Please be aware that if you make any changes to the env file once the container has been loaded, you will need to re-create it. Stopping & starting or restarting the container will not change the env file. The easiest way I found to force UnRAID to recreate the container with the new contents of the env file was to go into edit, change the "console shell command" from whatever it is set to the other and then hitting "Done". Once you're happy with your env file, revert back the console shell command to "shell" Happy setup 😄 Just wanted to say thanks for sharing this. I'd been scratching my head for a while, thinking I might have to move the config to another server that can run docker compose configurations. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.