Browse Source

chown TMP_DIR and LIB_DIR recursively inside docker_entrypoint to handle custom PUID

Nick Sweeting 1 year ago
parent
commit
63bf902f35
2 changed files with 9 additions and 6 deletions
  1. 8 5
      bin/docker_entrypoint.sh
  2. 1 1
      pyproject.toml

+ 8 - 5
bin/docker_entrypoint.sh

@@ -110,12 +110,15 @@ if [[ -d "$PLAYWRIGHT_BROWSERS_PATH/.links" ]]; then
     chown -h $PUID:$PGID "$PLAYWRIGHT_BROWSERS_PATH"/.links/*
 fi
 
-# also create and chown tmp dir and lib dirs
-mkdir -p "$DATA_DIR"/lib/bin
-chown $PUID:$PGID "$DATA_DIR"/lib "$DATA_DIR"/lib/*
+# also create and chown tmp dir and lib dir (and their default equivalents inside data/)
+# mkdir -p "$DATA_DIR"/lib/bin
+# chown $PUID:$PGID "$DATA_DIR"/lib "$DATA_DIR"/lib/*
+chown $PUID:$PGID "$LIB_DIR" 2>/dev/null
 chown $PUID:$PGID "$LIB_DIR/*" 2>/dev/null &
-mkdir -p "$DATA_DIR"/tmp/workers
-chown $PUID:$PGID "$DATA_DIR"/tmp "$DATA_DIR"/tmp/*
+
+# mkdir -p "$DATA_DIR"/tmp/workers
+# chown $PUID:$PGID "$DATA_DIR"/tmp "$DATA_DIR"/tmp/*
+chown $PUID:$PGID "$TMP_DIR" 2>/dev/null
 chown $PUID:$PGID "$TMP_DIR/*" 2>/dev/null &
 
 # (this check is written in blood in 2023, QEMU silently breaks things in ways that are not obvious)

+ 1 - 1
pyproject.toml

@@ -1,6 +1,6 @@
 [project]
 name = "archivebox"
-version = "0.8.5rc50"
+version = "0.8.5rc51"
 requires-python = ">=3.10"
 description = "Self-hosted internet archiving solution."
 authors = [{name = "Nick Sweeting", email = "[email protected]"}]