mirror of
https://github.com/linuxserver/docker-heimdall.git
synced 2025-10-27 11:13:41 +09:00
Symlink .env rather than copy
This commit is contained in:
@@ -136,6 +136,7 @@ This image now supports password protection through htpasswd. Run the following
|
|||||||
|
|
||||||
## Versions
|
## Versions
|
||||||
|
|
||||||
|
* **07.10.18:** - Symlink `.env` rather than copy. It now resides under `/config/www`
|
||||||
* **30.09.18:** - Multi-arch image. Move `.env` to `/config`.
|
* **30.09.18:** - Multi-arch image. Move `.env` to `/config`.
|
||||||
* **05.09.18:** - Rebase to alpine linux 3.8.
|
* **05.09.18:** - Rebase to alpine linux 3.8.
|
||||||
* **06.03.18:** - Use password protection if htpasswd is set. Existing users can delete their default site config at /config/nginx/site-confs/default and restart the container, a new default site config with htpasswd support will be created in its place
|
* **06.03.18:** - Use password protection if htpasswd is set. Existing users can delete their default site config at /config/nginx/site-confs/default and restart the container, a new default site config with htpasswd support will be created in its place
|
||||||
|
|||||||
@@ -47,6 +47,7 @@ app_setup_block: |
|
|||||||
|
|
||||||
# changelog
|
# changelog
|
||||||
changelogs:
|
changelogs:
|
||||||
|
- { date: "07.10.18:", desc: "Symlink `.env` rather than copy. It now resides under `/config/www`" }
|
||||||
- { date: "30.09.18:", desc: "Multi-arch image. Move `.env` to `/config`." }
|
- { date: "30.09.18:", desc: "Multi-arch image. Move `.env` to `/config`." }
|
||||||
- { date: "05.09.18:", desc: "Rebase to alpine linux 3.8." }
|
- { date: "05.09.18:", desc: "Rebase to alpine linux 3.8." }
|
||||||
- { date: "06.03.18:", desc: "Use password protection if htpasswd is set. Existing users can delete their default site config at /config/nginx/site-confs/default and restart the container, a new default site config with htpasswd support will be created in its place" }
|
- { date: "06.03.18:", desc: "Use password protection if htpasswd is set. Existing users can delete their default site config at /config/nginx/site-confs/default and restart the container, a new default site config with htpasswd support will be created in its place" }
|
||||||
|
|||||||
@@ -4,12 +4,17 @@
|
|||||||
mkdir -p \
|
mkdir -p \
|
||||||
/config/www/{backgrounds,icons}
|
/config/www/{backgrounds,icons}
|
||||||
|
|
||||||
|
# copy .env if not exists
|
||||||
|
[[ ! -f /config/www/.env ]] && \
|
||||||
|
cp /var/www/localhost/heimdall/.env /config/www/.env
|
||||||
|
|
||||||
# create symlinks
|
# create symlinks
|
||||||
|
|
||||||
symlinks=( \
|
symlinks=( \
|
||||||
/var/www/localhost/heimdall/storage/app/public/backgrounds \
|
/var/www/localhost/heimdall/storage/app/public/backgrounds \
|
||||||
/var/www/localhost/heimdall/storage/app/public/icons \
|
/var/www/localhost/heimdall/storage/app/public/icons \
|
||||||
/var/www/localhost/heimdall/database/app.sqlite )
|
/var/www/localhost/heimdall/database/app.sqlite \
|
||||||
|
/var/www/localhost/heimdall/.env )
|
||||||
|
|
||||||
for i in "${symlinks[@]}"
|
for i in "${symlinks[@]}"
|
||||||
do
|
do
|
||||||
@@ -17,11 +22,6 @@ do
|
|||||||
[[ ! -L "$i" ]] && ln -s /config/www/"$(basename "$i")" "$i"
|
[[ ! -L "$i" ]] && ln -s /config/www/"$(basename "$i")" "$i"
|
||||||
done
|
done
|
||||||
|
|
||||||
# sync .env
|
|
||||||
[[ ! -f /config/.env ]] && \
|
|
||||||
cp /var/www/localhost/heimdall/.env /config/.env
|
|
||||||
cp /config/.env /var/www/localhost/heimdall/.env
|
|
||||||
|
|
||||||
# permissions
|
# permissions
|
||||||
chown -R abc:abc \
|
chown -R abc:abc \
|
||||||
/config \
|
/config \
|
||||||
|
|||||||
Reference in New Issue
Block a user