Lock webui with ab main version.

This commit is contained in:
EstrellaXD
2023-03-04 23:32:27 +08:00
parent 2536d296d7
commit 4224086b2b
3 changed files with 13 additions and 8 deletions

View File

@@ -29,4 +29,5 @@ config/bangumi.json/config/bangumi.json
/.cache
/LICENSE
/README.md
/setup.py
/setup.py
dist.zip

View File

@@ -14,7 +14,7 @@ jobs:
uses: actions/checkout@v3
- name: Create Version info
run: |
echo "version = '$GITHUB_REF_NAME'" > src/__version__.py
echo "version='$GITHUB_REF_NAME'" > module/conf/version.py
- name: Docker meta
id: meta
uses: docker/metadata-action@v4

View File

@@ -1,5 +1,5 @@
# syntax=docker/dockerfile:1
FROM python:3.10-buster AS build
FROM python:3.11-buster AS build
RUN mkdir /install
WORKDIR /install
@@ -7,17 +7,17 @@ COPY requirements.txt .
RUN python3 -m pip install --upgrade pip \
&& pip install -r requirements.txt --prefix="/install"
FROM python:3.10-alpine
FROM python:3.11-alpine
ENV TZ=Asia/Shanghai \
PUID=1000 \
PGID=1000 \
UMASK=022
WORKDIR /src
WORKDIR /app
COPY --from=build --chmod=777 /install /usr/local
COPY --chmod=755 module /src
COPY --chmod=755 . .
RUN apk add --no-cache \
curl \
@@ -25,17 +25,21 @@ RUN apk add --no-cache \
su-exec \
bash
# Download WebUI
RUN wget https://github.com/Rewrite0/Auto_Bangumi_WebUI/releases/download/v1.0.4/dist.zip && \
unzip dist.zip && \
mv dist template
RUN addgroup -S auto_bangumi -g 1000 && \
adduser -S auto_bangumi -G auto_bangumi -h /home/auto_bangumi -u 1000 && \
usermod -s /bin/bash auto_bangumi && \
mkdir -p "/config" && \
chmod a+x \
run.sh \
getWebUI.sh \
setID.sh
EXPOSE 7892
VOLUME [ "/config" ]
VOLUME [ "/config" , "/data"]
CMD ["sh", "run.sh"]