Updated Docker entrypoint (#1984)

This commit is contained in:
Chris Plaatjes 2023-05-11 19:19:20 -04:00 committed by GitHub
parent 470d3a5587
commit e64a0684f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 6 deletions

View File

@ -17,6 +17,7 @@ FROM ubuntu:focal
COPY --from=copytask /Kavita /kavita
COPY --from=copytask /files/wwwroot /kavita/wwwroot
COPY API/config/appsettings.json /tmp/config/appsettings.json
#Installs program dependencies
RUN apt-get update \

View File

@ -15,13 +15,16 @@
# useradd -o -u "$PUID" -g "$PGID" -d /kavita kavita
#fi
#Checks if the config file exists, and creates it if it does not
if [ ! -f "/kavita/config/appsettings.json" ]; then
echo "Kavita configuration file does not exist, creating..."
echo '{
"TokenKey": "super secret unguessable key",
"Port": 5000,
"IpAddresses": ""
}' >> /kavita/config/appsettings.json
echo "Kavita configuration file does not exist, copying from temp..."
cp /tmp/config/appsettings.json /kavita/config/appsettings.json
if [ -f "/kavita/config/appsettings.json" ]; then
echo "Copy completed successfully, starting app..."
else
echo "Copy failed, check folder permissions. Exiting..."
exit
fi
fi
chmod +x Kavita