mirror of
https://github.com/Kareadita/Kavita.git
synced 2025-06-03 13:44:31 -04:00
* Refactored all the config files for Kavita to be loaded from config/. This will allow docker to just mount one folder and for Update functionality to be trivial. * Cleaned up documentation around new update method. * Updated docker files to support config directory * Removed entrypoint, no longer needed * Update appsettings to point to config directory for logs * Updated message for docker users that are upgrading * Ensure that docker users that have not updated their mount points from upgrade cannot start the server * Code smells * More cleanup * Added entrypoint to fix bind mount issues * Updated README with new folder structure * Fixed build system for new setup * Updated string path if user is docker * Updated the migration flow for docker to work properly and Fixed LogFile configuration updating. * Migrating docker images is now working 100% * Fixed config from bad code * Code cleanup Co-authored-by: Chris Plaatjes <kizaing@gmail.com>
31 lines
766 B
Bash
31 lines
766 B
Bash
#! /bin/bash
|
|
|
|
if [ ! -f "/kavita/config/appsettings.json" ]; then
|
|
echo "Kavita configuration file does not exist, creating..."
|
|
echo '{
|
|
"ConnectionStrings": {
|
|
"DefaultConnection": "Data source=config//kavita.db"
|
|
},
|
|
"TokenKey": "super secret unguessable key",
|
|
"Logging": {
|
|
"LogLevel": {
|
|
"Default": "Information",
|
|
"Microsoft": "Information",
|
|
"Microsoft.Hosting.Lifetime": "Error",
|
|
"Hangfire": "Information",
|
|
"Microsoft.AspNetCore.Hosting.Internal.WebHost": "Information"
|
|
},
|
|
"File": {
|
|
"Path": "config//logs/kavita.log",
|
|
"Append": "True",
|
|
"FileSizeLimitBytes": 26214400,
|
|
"MaxRollingFiles": 2
|
|
}
|
|
},
|
|
"Port": 5000
|
|
}' >> /kavita/config/appsettings.json
|
|
fi
|
|
|
|
chmod +x Kavita
|
|
|
|
./Kavita |