Compare commits
5 Commits
2026.01.11
...
2026.01.29
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3ce9021143 | ||
|
|
c7ce543704 | ||
|
|
6b9461c8a8 | ||
|
|
38a77d19f5 | ||
|
|
6a9098ab32 |
@@ -49,6 +49,7 @@ Certain values can be set via environment variables, using the `-e` parameter on
|
|||||||
* __TEMP_DIR__: Path where intermediary download files will be saved. Defaults to `/downloads` in the Docker image, and `.` otherwise.
|
* __TEMP_DIR__: Path where intermediary download files will be saved. Defaults to `/downloads` in the Docker image, and `.` otherwise.
|
||||||
* Set this to an SSD or RAM filesystem (e.g., `tmpfs`) for better performance.
|
* Set this to an SSD or RAM filesystem (e.g., `tmpfs`) for better performance.
|
||||||
* __Note__: Using a RAM filesystem may prevent downloads from being resumed.
|
* __Note__: Using a RAM filesystem may prevent downloads from being resumed.
|
||||||
|
* __CHOWN_DIRS__: If `false`, ownership of `DOWNLOAD_DIR`, `STATE_DIR`, and `TEMP_DIR` (and their contents) will not be set on container start. Ensure user under which MeTube runs has necessary access to these directories already. Defaults to `true`.
|
||||||
|
|
||||||
### 📝 File Naming & yt-dlp
|
### 📝 File Naming & yt-dlp
|
||||||
|
|
||||||
|
|||||||
@@ -9,8 +9,10 @@ if [ `id -u` -eq 0 ] && [ `id -g` -eq 0 ]; then
|
|||||||
if [ "${UID}" -eq 0 ]; then
|
if [ "${UID}" -eq 0 ]; then
|
||||||
echo "Warning: it is not recommended to run as root user, please check your setting of the UID environment variable"
|
echo "Warning: it is not recommended to run as root user, please check your setting of the UID environment variable"
|
||||||
fi
|
fi
|
||||||
|
if [ "${CHOWN_DIRS:-true}" != "false" ]; then
|
||||||
echo "Changing ownership of download and state directories to ${UID}:${GID}"
|
echo "Changing ownership of download and state directories to ${UID}:${GID}"
|
||||||
chown -R "${UID}":"${GID}" /app "${DOWNLOAD_DIR}" "${STATE_DIR}" "${TEMP_DIR}"
|
chown -R "${UID}":"${GID}" /app "${DOWNLOAD_DIR}" "${STATE_DIR}" "${TEMP_DIR}"
|
||||||
|
fi
|
||||||
echo "Running MeTube as user ${UID}:${GID}"
|
echo "Running MeTube as user ${UID}:${GID}"
|
||||||
exec su-exec "${UID}":"${GID}" python3 app/main.py
|
exec su-exec "${UID}":"${GID}" python3 app/main.py
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user