Fix Docker startup permission issue

This commit is contained in:
Dymas
2026-05-17 14:38:30 +02:00
parent 8ea43f1593
commit c91db90c1b
5 changed files with 10 additions and 5 deletions
+4
View File
@@ -1,5 +1,9 @@
# Changelog # Changelog
## 0.30.3 - 2026-05-17
- Fixed container startup under `docker-compose` and custom `USER_UID`/`USER_GID` mappings by launching the web app with `python3 /app/app.py` directly instead of relying on the `./ani-cli-web` launcher file being executable inside the container.
## 0.30.2 - 2026-05-17 ## 0.30.2 - 2026-05-17
- Added container runtime support for `USER_UID` and `USER_GID`, letting `ani-cli-web` run under a chosen numeric host user/group so files created in mounted folders are not owned by `root`. - Added container runtime support for `USER_UID` and `USER_GID`, letting `ani-cli-web` run under a chosen numeric host user/group so files created in mounted folders are not owned by `root`.
+2 -1
View File
@@ -2,7 +2,7 @@
A local web UI for a system-wide `ani-cli` install. A local web UI for a system-wide `ani-cli` install.
Current version: `0.30.2` Current version: `0.30.3`
## Project Layout ## Project Layout
@@ -124,6 +124,7 @@ Container defaults:
- `ani-cli` is installed at `/usr/local/bin/ani-cli`. - `ani-cli` is installed at `/usr/local/bin/ani-cli`.
- `ani-cli-web` is cloned into `/app` and started from there. - `ani-cli-web` is cloned into `/app` and started from there.
- Container startup now runs `python3 /app/app.py` directly, so it does not depend on the `ani-cli-web` launcher file having executable permissions inside the image.
- Downloads are written to `/downloads`, so bind-mount `./downloads:/downloads`. - Downloads are written to `/downloads`, so bind-mount `./downloads:/downloads`.
- App state stays under `/app/.ani-cli-web`, so bind-mount `./.ani-cli-web:/app/.ani-cli-web`. - App state stays under `/app/.ani-cli-web`, so bind-mount `./.ani-cli-web:/app/.ani-cli-web`.
- The image sets `ANI_CLI_WEB_HOST=0.0.0.0` and exposes port `8421`. - The image sets `ANI_CLI_WEB_HOST=0.0.0.0` and exposes port `8421`.
+1 -1
View File
@@ -1 +1 @@
0.30.2 0.30.3
+1 -1
View File
@@ -16,7 +16,7 @@ from uuid import uuid4
PROJECT_ROOT = Path(__file__).resolve().parent PROJECT_ROOT = Path(__file__).resolve().parent
ANI_CLI = os.environ.get("ANI_CLI_BIN") or shutil.which("ani-cli") or "ani-cli" ANI_CLI = os.environ.get("ANI_CLI_BIN") or shutil.which("ani-cli") or "ani-cli"
APP_NAME = "ani-cli-web" APP_NAME = "ani-cli-web"
VERSION = "0.30.2" VERSION = "0.30.3"
ALLANIME_BASE = "allanime.day" ALLANIME_BASE = "allanime.day"
ALLANIME_API = f"https://api.{ALLANIME_BASE}" ALLANIME_API = f"https://api.{ALLANIME_BASE}"
ALLANIME_REFERER = "https://allmanga.to" ALLANIME_REFERER = "https://allmanga.to"
+2 -2
View File
@@ -41,7 +41,7 @@ run_as_requested_user() {
--reuid "$uid" \ --reuid "$uid" \
--regid "$gid" \ --regid "$gid" \
--clear-groups \ --clear-groups \
env HOME=/app/.ani-cli-web/home ./ani-cli-web "$@" env HOME=/app/.ani-cli-web/home python3 /app/app.py "$@"
} }
mkdir -p /downloads /app/.ani-cli-web mkdir -p /downloads /app/.ani-cli-web
@@ -54,4 +54,4 @@ fi
run_as_requested_user "$@" || true run_as_requested_user "$@" || true
cd /app cd /app
exec ./ani-cli-web "$@" exec python3 /app/app.py "$@"