mirror of
https://github.com/Kareadita/Kavita.git
synced 2025-07-09 03:04:19 -04:00
Feature/docker parity (#714)
* 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 * Fixed monorepo-build.sh Co-authored-by: Chris Plaatjes <kizaing@gmail.com>
This commit is contained in:
parent
2c96bd3552
commit
7bfd2c432d
@ -48,6 +48,7 @@ namespace API.Services
|
||||
reSearchPattern.IsMatch(Path.GetExtension(file)) && !Path.GetFileName(file).StartsWith(Parser.Parser.MacOsMetadataFileStartsWith));
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns a list of folders from end of fullPath to rootPath. If a file is passed at the end of the fullPath, it will be ignored.
|
||||
///
|
||||
@ -96,7 +97,7 @@ namespace API.Services
|
||||
return di.Exists;
|
||||
}
|
||||
|
||||
public static IEnumerable<string> GetFiles(string path, string searchPatternExpression = "",
|
||||
public IEnumerable<string> GetFiles(string path, string searchPatternExpression = "",
|
||||
SearchOption searchOption = SearchOption.TopDirectoryOnly)
|
||||
{
|
||||
if (searchPatternExpression != string.Empty)
|
||||
@ -132,10 +133,10 @@ namespace API.Services
|
||||
/// </summary>
|
||||
/// <param name="sourceDirName"></param>
|
||||
/// <param name="destDirName"></param>
|
||||
/// <param name="searchPattern">Defaults to empty string, meaning all files</param>
|
||||
/// <param name="searchPattern">Defaults to *, meaning all files</param>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="DirectoryNotFoundException"></exception>
|
||||
public static bool CopyDirectoryToDirectory(string sourceDirName, string destDirName, string searchPattern = "")
|
||||
public bool CopyDirectoryToDirectory(string sourceDirName, string destDirName, string searchPattern = "*")
|
||||
{
|
||||
if (string.IsNullOrEmpty(sourceDirName)) return false;
|
||||
|
||||
@ -177,13 +178,7 @@ namespace API.Services
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Get files with a file extension
|
||||
/// </summary>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="searchPatternExpression">Regex to use for searching on regex. Defaults to empty string for all files</param>
|
||||
/// <returns></returns>
|
||||
public static string[] GetFilesWithExtension(string path, string searchPatternExpression = "")
|
||||
public string[] GetFilesWithExtension(string path, string searchPatternExpression = "")
|
||||
{
|
||||
if (searchPatternExpression != string.Empty)
|
||||
{
|
||||
@ -381,11 +376,8 @@ namespace API.Services
|
||||
IEnumerable<string> subDirs;
|
||||
string[] files;
|
||||
|
||||
try
|
||||
{
|
||||
// Default EnumerationOptions will ignore system and hidden folders
|
||||
subDirs = Directory.GetDirectories(currentDir, "*", new EnumerationOptions())
|
||||
.Where(path => ExcludeDirectories.Matches(path).Count == 0);
|
||||
try {
|
||||
subDirs = Directory.GetDirectories(currentDir).Where(path => ExcludeDirectories.Matches(path).Count == 0);
|
||||
}
|
||||
// Thrown if we do not have discovery permission on the directory.
|
||||
catch (UnauthorizedAccessException e) {
|
||||
|
@ -50,22 +50,22 @@ Package()
|
||||
|
||||
echo "Copying Install information"
|
||||
cp ../INSTALL.txt "$lOutputFolder"/README.txt
|
||||
|
||||
|
||||
echo "Copying LICENSE"
|
||||
cp ../LICENSE "$lOutputFolder"/LICENSE.txt
|
||||
|
||||
echo "Show API structure"
|
||||
find
|
||||
|
||||
|
||||
echo "Copying appsettings.json"
|
||||
cp appsettings.Development.json $lOutputFolder/appsettings.json
|
||||
cp appsettings.Development.json $lOutputFolder/config/appsettings.json
|
||||
|
||||
echo "Creating tar"
|
||||
cd ../$outputFolder/"$runtime"/
|
||||
tar -czvf ../kavita-$runtime.tar.gz Kavita
|
||||
|
||||
ProgressEnd "Creating $runtime Package for $framework"
|
||||
|
||||
|
||||
ProgressEnd "Creating $runtime Package for $framework"
|
||||
|
||||
}
|
||||
|
||||
dir=$PWD
|
||||
|
Loading…
x
Reference in New Issue
Block a user