mirror of
https://github.com/linuxserver/docker-heimdall.git
synced 2025-10-26 18:53:40 +09:00
Merge pull request #3 from linuxserver/rm_baseurl
Remove baseurl, change www location
This commit is contained in:
16
Dockerfile
16
Dockerfile
@@ -17,19 +17,19 @@ RUN \
|
||||
php7-pdo_sqlite \
|
||||
php7-tokenizer \
|
||||
tar && \
|
||||
mkdir -p /app/heimdall && \
|
||||
echo "**** install heimdall ****" && \
|
||||
VERSION="$(curl -sX GET https://api.github.com/repos/linuxserver/Heimdall/releases/latest | grep 'tag_name' | cut -d\" -f4)" && \
|
||||
echo "**Installing Heimdall ${VERSION}**" && \
|
||||
mkdir -p \
|
||||
/var/www/localhost/heimdall && \
|
||||
curl -o \
|
||||
/tmp/heimdall.tar.gz -L \
|
||||
"https://github.com/linuxserver/Heimdall/archive/${VERSION}.tar.gz" && \
|
||||
/tmp/heimdall.tar.gz -L \
|
||||
"https://github.com/linuxserver/Heimdall/archive/${VERSION}.tar.gz" && \
|
||||
tar xf \
|
||||
/tmp/heimdall.tar.gz -C \
|
||||
/tmp && \
|
||||
cp -R /tmp/Heimdall-*/* /app/heimdall/ && \
|
||||
/tmp/heimdall.tar.gz -C \
|
||||
/var/www/localhost/heimdall --strip-components=1 && \
|
||||
echo "** cleanup **" && \
|
||||
rm -rf \
|
||||
/tmp/*
|
||||
/tmp/*
|
||||
|
||||
# add local files
|
||||
COPY root/ /
|
||||
|
||||
@@ -3,7 +3,7 @@ server {
|
||||
|
||||
listen 443 ssl;
|
||||
|
||||
root /app/root;
|
||||
root /var/www/localhost/heimdall/public;
|
||||
index index.php index.html index.htm;
|
||||
|
||||
server_name _;
|
||||
|
||||
@@ -4,23 +4,12 @@
|
||||
mkdir -p \
|
||||
/config/www/{backgrounds,icons}
|
||||
|
||||
# set base url if needed
|
||||
rm -rf /app/root
|
||||
if [ -z "$BASEURL" ]; then
|
||||
echo "No base url set. You can access the app at http://SERVERIP:PORT"
|
||||
ln -s ./heimdall/public /app/root
|
||||
else
|
||||
echo "Setting base url. You can access the app at http://SERVERIP:PORT/$BASEURL"
|
||||
mkdir -p /app/root
|
||||
ln -s ../heimdall/public /app/root/"$BASEURL"
|
||||
fi
|
||||
|
||||
# symlink user config
|
||||
|
||||
symlinks=( \
|
||||
/app/heimdall/storage/app/public/backgrounds \
|
||||
/app/heimdall/storage/app/public/icons \
|
||||
/app/heimdall/database/app.sqlite )
|
||||
/var/www/localhost/heimdall/storage/app/public/backgrounds \
|
||||
/var/www/localhost/heimdall/storage/app/public/icons \
|
||||
/var/www/localhost/heimdall/database/app.sqlite )
|
||||
|
||||
for i in "${symlinks[@]}"
|
||||
do
|
||||
@@ -31,4 +20,4 @@ done
|
||||
# permissions
|
||||
chown -R abc:abc \
|
||||
/config \
|
||||
/app
|
||||
/var/www/localhost/heimdall
|
||||
|
||||
Reference in New Issue
Block a user