mirror of
https://github.com/Kareadita/Kavita.git
synced 2025-07-09 03:04:19 -04:00
Updated Docker entrypoint (#1984)
This commit is contained in:
parent
470d3a5587
commit
e64a0684f4
@ -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 \
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user