feat: frontend remote download
This commit is contained in:
parent
b1ef771222
commit
1c53a291fb
34
.github/workflows/build-docker.yml
vendored
34
.github/workflows/build-docker.yml
vendored
@ -9,7 +9,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
-
|
-
|
||||||
name: Checkout
|
name: Checkout
|
||||||
uses: actions/checkout@master
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Docker meta
|
- name: Docker meta
|
||||||
id: meta
|
id: meta
|
||||||
@ -24,49 +24,33 @@ jobs:
|
|||||||
app_version=$(cat version.py |sed -ne "s/APP_VERSION\s=\s'v\(.*\)'/\1/gp")
|
app_version=$(cat version.py |sed -ne "s/APP_VERSION\s=\s'v\(.*\)'/\1/gp")
|
||||||
echo "app_version=$app_version" >> $GITHUB_ENV
|
echo "app_version=$app_version" >> $GITHUB_ENV
|
||||||
|
|
||||||
-
|
|
||||||
name: Setup node
|
|
||||||
uses: actions/setup-node@v3
|
|
||||||
with:
|
|
||||||
node-version: '18'
|
|
||||||
|
|
||||||
-
|
|
||||||
name: Build frontend
|
|
||||||
id: build_brontend
|
|
||||||
run: |
|
|
||||||
git clone https://github.com/jxxghp/MoviePilot-Frontend
|
|
||||||
cd MoviePilot-Frontend
|
|
||||||
yarn && yarn build
|
|
||||||
cd ..
|
|
||||||
mkdir -p public
|
|
||||||
cp -rf ./MoviePilot-Frontend/dist/* ./public/
|
|
||||||
rm -rf MoviePilot-Frontend
|
|
||||||
chmod +x start.sh
|
|
||||||
|
|
||||||
-
|
-
|
||||||
name: Set Up QEMU
|
name: Set Up QEMU
|
||||||
uses: docker/setup-qemu-action@v1
|
uses: docker/setup-qemu-action@v2
|
||||||
|
|
||||||
-
|
-
|
||||||
name: Set Up Buildx
|
name: Set Up Buildx
|
||||||
uses: docker/setup-buildx-action@v1
|
uses: docker/setup-buildx-action@v2
|
||||||
|
|
||||||
-
|
-
|
||||||
name: Login DockerHub
|
name: Login DockerHub
|
||||||
uses: docker/login-action@v1
|
uses: docker/login-action@v2
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKER_USERNAME }}
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
|
|
||||||
-
|
-
|
||||||
name: Build Image
|
name: Build Image
|
||||||
uses: docker/build-push-action@v2
|
uses: docker/build-push-action@v4
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
file: ./Dockerfile
|
file: Dockerfile
|
||||||
platforms: |
|
platforms: |
|
||||||
linux/amd64
|
linux/amd64
|
||||||
|
linux/arm64
|
||||||
push: true
|
push: true
|
||||||
|
build-args: |
|
||||||
|
MOVIEPILOT_FRONTEND_VERSION=${{ env.app_version }}
|
||||||
tags: |
|
tags: |
|
||||||
${{ secrets.DOCKER_USERNAME }}/moviepilot:latest
|
${{ secrets.DOCKER_USERNAME }}/moviepilot:latest
|
||||||
${{ secrets.DOCKER_USERNAME }}/moviepilot:${{ env.app_version }}
|
${{ secrets.DOCKER_USERNAME }}/moviepilot:${{ env.app_version }}
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
FROM python:3.10.11-slim
|
FROM python:3.10.11-slim
|
||||||
|
ARG MOVIEPILOT_FRONTEND_VERSION
|
||||||
ENV LANG="C.UTF-8" \
|
ENV LANG="C.UTF-8" \
|
||||||
HOME="/moviepilot" \
|
HOME="/moviepilot" \
|
||||||
TERM="xterm" \
|
TERM="xterm" \
|
||||||
@ -41,9 +42,10 @@ RUN apt-get update \
|
|||||||
gosu \
|
gosu \
|
||||||
bash \
|
bash \
|
||||||
wget \
|
wget \
|
||||||
&& mkdir -p /etc/nginx ${HOME} \
|
curl \
|
||||||
|
busybox \
|
||||||
&& cp -f nginx.conf /etc/nginx/nginx.template.conf \
|
&& cp -f nginx.conf /etc/nginx/nginx.template.conf \
|
||||||
&& mv ./public / \
|
&& mkdir -p ${HOME} \
|
||||||
&& groupadd -r moviepilot -g 911 \
|
&& groupadd -r moviepilot -g 911 \
|
||||||
&& useradd -r moviepilot -g moviepilot -d ${HOME} -s /bin/bash -u 911 \
|
&& useradd -r moviepilot -g moviepilot -d ${HOME} -s /bin/bash -u 911 \
|
||||||
&& pip install --upgrade pip \
|
&& pip install --upgrade pip \
|
||||||
@ -54,6 +56,8 @@ RUN apt-get update \
|
|||||||
&& echo 'fs.inotify.max_user_watches=5242880' >> /etc/sysctl.conf \
|
&& echo 'fs.inotify.max_user_watches=5242880' >> /etc/sysctl.conf \
|
||||||
&& echo 'fs.inotify.max_user_instances=5242880' >> /etc/sysctl.conf \
|
&& echo 'fs.inotify.max_user_instances=5242880' >> /etc/sysctl.conf \
|
||||||
&& locale-gen zh_CN.UTF-8 \
|
&& locale-gen zh_CN.UTF-8 \
|
||||||
|
&& curl -sL "https://github.com/jxxghp/MoviePilot-Frontend/releases/download/v${MOVIEPILOT_FRONTEND_VERSION}/dist.zip" | busybox unzip -d / - \
|
||||||
|
&& mv /dist /public \
|
||||||
&& apt-get autoremove -y \
|
&& apt-get autoremove -y \
|
||||||
&& apt-get clean -y \
|
&& apt-get clean -y \
|
||||||
&& rm -rf \
|
&& rm -rf \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user