Add ANI_CLI_WEB_BRANCH build arg
- add ANI_CLI_WEB_BRANCH to the Docker build so ani-cli-web can be cloned from master or another branch - pass the new build arg through docker-compose - document the new branch-selection workflow in the README
This commit is contained in:
+3
-1
@@ -5,6 +5,7 @@ ARG ANI_CLI_BRANCH=master
|
||||
ARG ANIKOTO_CLI=https://github.com/Slimyslushy/anikoto-cli.git
|
||||
ARG ANIKOTO_CLI_BRANCH=main
|
||||
ARG ANI_CLI_WEB=https://gitea.coreplay.eu/Dymas/ani-cli-web.git
|
||||
ARG ANI_CLI_WEB_BRANCH=main
|
||||
ARG YT_DLP_RELEASE_URL=https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive \
|
||||
@@ -13,6 +14,7 @@ ENV DEBIAN_FRONTEND=noninteractive \
|
||||
ANIKOTO_CLI_REPO=${ANIKOTO_CLI} \
|
||||
ANIKOTO_CLI_BRANCH=${ANIKOTO_CLI_BRANCH} \
|
||||
ANI_CLI_WEB_REPO=${ANI_CLI_WEB} \
|
||||
ANI_CLI_WEB_BRANCH=${ANI_CLI_WEB_BRANCH} \
|
||||
ANI_CLI_BIN=ani-cli \
|
||||
ANIKOTO_CLI_BIN=anikoto-cli \
|
||||
ANI_CLI_DOWNLOAD_DIR=/downloads \
|
||||
@@ -57,7 +59,7 @@ RUN curl -fL "${YT_DLP_RELEASE_URL}" -o /usr/local/bin/yt-dlp \
|
||||
&& chmod 0755 /usr/local/bin/yt-dlp \
|
||||
&& yt-dlp --version
|
||||
|
||||
RUN git clone --depth 1 "${ANI_CLI_WEB}" /app \
|
||||
RUN git clone --depth 1 --branch "${ANI_CLI_WEB_BRANCH}" "${ANI_CLI_WEB}" /app \
|
||||
&& rm -rf /app/.git \
|
||||
&& rm -f \
|
||||
/app/.dockerignore \
|
||||
|
||||
@@ -50,6 +50,12 @@ Useful flags and env:
|
||||
- `ANI_CLI_WEB_PORT=8421`
|
||||
- `ANI_CLI_BIN=/path/to/ani-cli`
|
||||
|
||||
Build args:
|
||||
|
||||
- `ANI_CLI_BRANCH=master`
|
||||
- `ANIKOTO_CLI_BRANCH=main`
|
||||
- `ANI_CLI_WEB_BRANCH=main`
|
||||
|
||||
## Docker
|
||||
|
||||
Build:
|
||||
@@ -58,6 +64,12 @@ Build:
|
||||
docker build -t ani-cli-web .
|
||||
```
|
||||
|
||||
Build a specific ani-cli-web branch:
|
||||
|
||||
```sh
|
||||
docker build --build-arg ANI_CLI_WEB_BRANCH=master -t ani-cli-web .
|
||||
```
|
||||
|
||||
Run:
|
||||
|
||||
```sh
|
||||
@@ -76,6 +88,12 @@ Compose:
|
||||
USER_UID="$(id -u)" USER_GID="$(id -g)" docker compose up --build -d
|
||||
```
|
||||
|
||||
Compose can also target a specific ani-cli-web branch:
|
||||
|
||||
```sh
|
||||
ANI_CLI_WEB_BRANCH=master USER_UID="$(id -u)" USER_GID="$(id -g)" docker compose up --build -d
|
||||
```
|
||||
|
||||
Docker notes:
|
||||
|
||||
- The container serves on `0.0.0.0:8421`
|
||||
|
||||
@@ -9,6 +9,7 @@ services:
|
||||
ANIKOTO_CLI: ${ANIKOTO_CLI:-https://github.com/Slimyslushy/anikoto-cli.git}
|
||||
ANIKOTO_CLI_BRANCH: ${ANIKOTO_CLI_BRANCH:-main}
|
||||
ANI_CLI_WEB: ${ANI_CLI_WEB:-https://gitea.coreplay.eu/Dymas/ani-cli-web.git}
|
||||
ANI_CLI_WEB_BRANCH: ${ANI_CLI_WEB_BRANCH:-main}
|
||||
image: ani-cli-web:latest
|
||||
container_name: ani-cli-web
|
||||
restart: unless-stopped
|
||||
|
||||
Reference in New Issue
Block a user