mirror of
https://github.com/Kareadita/Kavita.git
synced 2025-07-09 03:04:19 -04:00
Hotfix/docker file permissions (#350)
* Fixed file pathing for automated docker builds * Added back in renaming the Kavita executable * Testing new method for copying wwwroot folder * Fixed file pathing * Fixed pathing to test * Potential fix for Docker file permissions Co-authored-by: Chris Plaatjes <chris.p@boxbrite.com> Co-authored-by: Boxbrite User <boxbrite@Rathalos.localdomain>
This commit is contained in:
parent
20ba41c38f
commit
f7f983045d
9
.github/workflows/nightly-docker.yml
vendored
9
.github/workflows/nightly-docker.yml
vendored
@ -1,4 +1,4 @@
|
||||
name: CI to Docker Hub
|
||||
name: Build Nightly Docker
|
||||
|
||||
on:
|
||||
push:
|
||||
@ -25,8 +25,6 @@ jobs:
|
||||
with:
|
||||
node-version: '14'
|
||||
- run: |
|
||||
echo 'Checking folder structure'
|
||||
ls -l
|
||||
|
||||
cd Kavita-webui/ || exit
|
||||
echo 'Installing web dependencies'
|
||||
@ -35,14 +33,9 @@ jobs:
|
||||
echo 'Building UI'
|
||||
npm run prod
|
||||
|
||||
echo 'Checking dist folder for compiling integrity'
|
||||
ls -l dist
|
||||
|
||||
echo 'Copying back to Kavita wwwroot'
|
||||
rsync -a dist/ ../API/wwwroot/
|
||||
|
||||
echo 'Checking Kavita wwwroot for copying integrity'
|
||||
ls -l ../API/wwwroot
|
||||
cd ../ || exit
|
||||
|
||||
- name: Compile dotnet app
|
||||
|
18
.github/workflows/stable-docker.yml
vendored
18
.github/workflows/stable-docker.yml
vendored
@ -1,4 +1,4 @@
|
||||
name: CI to Docker Hub
|
||||
name: Build Stable Docker
|
||||
|
||||
on:
|
||||
push:
|
||||
@ -25,20 +25,17 @@ jobs:
|
||||
with:
|
||||
node-version: '14'
|
||||
- run: |
|
||||
echo 'Removing old wwwroot'
|
||||
rm -rf API/wwwroot/*
|
||||
|
||||
cd Kavita-webui/ || exit
|
||||
echo 'Installing web dependencies'
|
||||
npm install
|
||||
|
||||
echo 'Building UI'
|
||||
npm run prod
|
||||
echo 'Checking dist folder for compiling integrity'
|
||||
ls -l dist
|
||||
|
||||
echo 'Copying back to Kavita wwwroot'
|
||||
mkdir ../API/wwwroot
|
||||
cp -r dist/* ../API/wwwroot
|
||||
echo 'Checking Kavita wwwroot for copying integrity'
|
||||
ls -l ../API/wwwroot
|
||||
rsync -a dist/ ../API/wwwroot/
|
||||
|
||||
cd ../ || exit
|
||||
|
||||
- name: Compile dotnet app
|
||||
@ -72,9 +69,6 @@ jobs:
|
||||
- name: Image digest
|
||||
run: echo ${{ steps.docker_build.outputs.digest }}
|
||||
|
||||
- name: Image digest
|
||||
run: echo ${{ steps.docker_build.outputs.digest }}
|
||||
|
||||
- name: Notify Discord
|
||||
uses: rjstone/discord-webhook-notify@v1
|
||||
with:
|
||||
|
@ -1,6 +1,6 @@
|
||||
#This Dockerfile creates a build for all architectures
|
||||
|
||||
#Production image
|
||||
#Image that copies in the files and passes them to the main image
|
||||
FROM ubuntu:focal AS copytask
|
||||
|
||||
ARG TARGETPLATFORM
|
||||
@ -8,12 +8,15 @@ ARG TARGETPLATFORM
|
||||
#Move the output files to where they need to be
|
||||
RUN mkdir /files
|
||||
COPY _output/*.tar.gz /files/
|
||||
COPY Kavita-webui/dist /files/wwwroot
|
||||
COPY copy_runtime.sh /copy_runtime.sh
|
||||
RUN /copy_runtime.sh
|
||||
|
||||
#Production image
|
||||
FROM ubuntu:focal
|
||||
|
||||
COPY --from=copytask /kavita /kavita
|
||||
COPY --from=copytask /Kavita /kavita
|
||||
COPY --from=copytask /files/wwwroot /kavita/wwwroot
|
||||
|
||||
#Installs program dependencies
|
||||
RUN apt-get update \
|
||||
|
@ -7,13 +7,10 @@ set -xv
|
||||
if [ "$TARGETPLATFORM" == "linux/amd64" ]
|
||||
then
|
||||
tar xf /files/kavita-linux-x64.tar.gz -C /
|
||||
mv /Kavita /kavita
|
||||
elif [ "$TARGETPLATFORM" == "linux/arm/v7" ]
|
||||
then
|
||||
tar xf /files/kavita-linux-arm.tar.gz -C /
|
||||
mv /Kavita /kavita
|
||||
elif [ "$TARGETPLATFORM" == "linux/arm64" ]
|
||||
then
|
||||
tar xf /files/kavita-linux-arm64.tar.gz -C /
|
||||
mv /Kavita /kavita
|
||||
fi
|
||||
|
@ -13,7 +13,7 @@ then
|
||||
rm /kavita/appsettings.json
|
||||
ln -s /kavita/data/appsettings.json /kavita/
|
||||
else
|
||||
mv /kavita/appsettings.json /kavita/data/
|
||||
mv /kavita/appsettings.json /kavita/data/ || true
|
||||
ln -s /kavita/data/appsettings.json /kavita/
|
||||
fi
|
||||
|
||||
@ -55,11 +55,11 @@ then
|
||||
else
|
||||
if [ -d /kavita/data/logs ]
|
||||
then
|
||||
touch /kavita/data/logs/kavita.log
|
||||
echo "" > /kavita/data/logs/kavita.log || true
|
||||
ln -s /kavita/data/logs/kavita.log /kavita/
|
||||
else
|
||||
mkdir /kavita/data/logs
|
||||
touch /kavita/data/logs/kavita.log
|
||||
echo "" > /kavita/data/logs/kavita.log || true
|
||||
ln -s /kavita/data/logs/kavita.log /kavita/
|
||||
fi
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user