mirror of
https://github.com/Kareadita/Kavita.git
synced 2025-07-09 03:04:19 -04:00
merged develop into main
This commit is contained in:
commit
c0cbcb581c
@ -211,4 +211,8 @@
|
|||||||
<ProjectReference Include="..\Kavita.Common\Kavita.Common.csproj" />
|
<ProjectReference Include="..\Kavita.Common\Kavita.Common.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\Kavita.Common\Kavita.Common.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
@ -9,6 +9,7 @@ using API.Entities.Enums;
|
|||||||
using API.Services;
|
using API.Services;
|
||||||
using Kavita.Common;
|
using Kavita.Common;
|
||||||
using Microsoft.AspNetCore.Identity;
|
using Microsoft.AspNetCore.Identity;
|
||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
|
||||||
namespace API.Data
|
namespace API.Data
|
||||||
{
|
{
|
||||||
@ -70,5 +71,21 @@ namespace API.Data
|
|||||||
await context.SaveChangesAsync();
|
await context.SaveChangesAsync();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static async Task SeedSeriesMetadata(DataContext context)
|
||||||
|
{
|
||||||
|
await context.Database.EnsureCreatedAsync();
|
||||||
|
|
||||||
|
context.Database.EnsureCreated();
|
||||||
|
var series = await context.Series
|
||||||
|
.Include(s => s.Metadata).ToListAsync();
|
||||||
|
|
||||||
|
foreach (var s in series)
|
||||||
|
{
|
||||||
|
s.Metadata ??= new SeriesMetadata();
|
||||||
|
}
|
||||||
|
|
||||||
|
await context.SaveChangesAsync();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
28
Dockerfile.alpine
Normal file
28
Dockerfile.alpine
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
#This Dockerfile is for the musl alpine build of Kavita.
|
||||||
|
FROM alpine:latest
|
||||||
|
|
||||||
|
MAINTAINER Chris P
|
||||||
|
|
||||||
|
#Installs the needed dependencies
|
||||||
|
RUN apk update && apk add --no-cache wget curl pwgen icu-dev bash
|
||||||
|
|
||||||
|
#Downloads Kavita, unzips and moves the folders to where they need to be
|
||||||
|
RUN wget https://github.com/Kareadita/Kavita/releases/download/v0.3.7/kavita-linux-musl-x64.tar.gz \
|
||||||
|
&& tar -xzf kavita*.tar.gz \
|
||||||
|
&& mv Kavita/ /kavita/ \
|
||||||
|
&& rm kavita*.gz \
|
||||||
|
&& chmod +x /kavita/Kavita
|
||||||
|
|
||||||
|
#Creates the needed folders
|
||||||
|
RUN mkdir /manga /kavita/data /kavita/temp /kavita/cache
|
||||||
|
|
||||||
|
RUN sed -i 's/Data source=kavita.db/Data source=data\/kavita.db/g' /kavita/appsettings.json
|
||||||
|
|
||||||
|
COPY entrypoint.sh /entrypoint.sh
|
||||||
|
|
||||||
|
EXPOSE 5000
|
||||||
|
|
||||||
|
WORKDIR /kavita
|
||||||
|
|
||||||
|
ENTRYPOINT ["/bin/bash"]
|
||||||
|
CMD ["/entrypoint.sh"]
|
27
Dockerfile.arm
Normal file
27
Dockerfile.arm
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
#This Dockerfile pulls the latest git commit and builds Kavita from source
|
||||||
|
|
||||||
|
#Production image
|
||||||
|
FROM ubuntu:focal
|
||||||
|
|
||||||
|
#Move the output files to where they need to be
|
||||||
|
COPY Kavita /kavita
|
||||||
|
|
||||||
|
#Installs program dependencies
|
||||||
|
RUN apt-get update \
|
||||||
|
&& apt-get install -y libicu-dev libssl1.1 pwgen \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
#Creates the manga storage directory
|
||||||
|
RUN mkdir /kavita/data
|
||||||
|
|
||||||
|
RUN cp /kavita/appsettings.Development.json /kavita/appsettings.json \
|
||||||
|
&& sed -i 's/Data source=kavita.db/Data source=data\/kavita.db/g' /kavita/appsettings.json
|
||||||
|
|
||||||
|
COPY entrypoint.sh /entrypoint.sh
|
||||||
|
|
||||||
|
EXPOSE 5000
|
||||||
|
|
||||||
|
WORKDIR /kavita
|
||||||
|
|
||||||
|
ENTRYPOINT ["/bin/bash"]
|
||||||
|
CMD ["/entrypoint.sh"]
|
27
build_target.sh
Normal file
27
build_target.sh
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
mkdir Projects
|
||||||
|
|
||||||
|
cd Projects
|
||||||
|
|
||||||
|
git clone https://github.com/Kareadita/Kavita.git
|
||||||
|
git clone https://github.com/Kareadita/Kavita-webui.git
|
||||||
|
|
||||||
|
cd Kavita
|
||||||
|
chmod +x build.sh
|
||||||
|
|
||||||
|
#Builds program based on the target platform
|
||||||
|
|
||||||
|
if [ "$TARGETPLATFORM" == "linux/amd64" ]
|
||||||
|
then
|
||||||
|
./build.sh linux-x64
|
||||||
|
mv /Projects/Kavita/_output/linux-x64 /Projects/Kavita/_output/build
|
||||||
|
elif [ "$TARGETPLATFORM" == "linux/arm/v7" ]
|
||||||
|
then
|
||||||
|
./build.sh linux-arm
|
||||||
|
mv /Projects/Kavita/_output/linux-arm /Projects/Kavita/_output/build
|
||||||
|
elif [ "$TARGETPLATFORM" == "linux/arm64" ]
|
||||||
|
then
|
||||||
|
./build.sh linux-arm64
|
||||||
|
mv /Projects/Kavita/_output/linux-arm64 /Projects/Kavita/_output/build
|
||||||
|
fi
|
Loading…
x
Reference in New Issue
Block a user