mirror of
https://github.com/linuxserver/docker-heimdall.git
synced 2025-10-27 03:03:38 +09:00
Merge pull request #11 from linuxserver/symlink
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
|
||||
|
||||
* **07.10.18:** - Symlink `.env` rather than copy. It now resides under `/config/www`
|
||||
* **30.09.18:** - Multi-arch image. Move `.env` to `/config`.
|
||||
* **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
|
||||
|
||||
@@ -47,6 +47,7 @@ app_setup_block: |
|
||||
|
||||
# changelog
|
||||
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: "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" }
|
||||
|
||||
@@ -4,12 +4,17 @@
|
||||
mkdir -p \
|
||||
/config/www/{backgrounds,icons}
|
||||
|
||||
# copy .env if not exists
|
||||
[[ ! -f /config/www/.env ]] && \
|
||||
cp /var/www/localhost/heimdall/.env /config/www/.env
|
||||
|
||||
# create symlinks
|
||||
|
||||
symlinks=( \
|
||||
/var/www/localhost/heimdall/storage/app/public/backgrounds \
|
||||
/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[@]}"
|
||||
do
|
||||
@@ -17,11 +22,6 @@ do
|
||||
[[ ! -L "$i" ]] && ln -s /config/www/"$(basename "$i")" "$i"
|
||||
done
|
||||
|
||||
# sync .env
|
||||
[[ ! -f /config/.env ]] && \
|
||||
cp /var/www/localhost/heimdall/.env /config/.env
|
||||
cp /config/.env /var/www/localhost/heimdall/.env
|
||||
|
||||
# permissions
|
||||
chown -R abc:abc \
|
||||
/config \
|
||||
|
||||
Reference in New Issue
Block a user