Create AUDIO_DOWNLOAD_DIR in Docker image

This commit is contained in:
Andrew Keeton
2026-06-11 17:21:56 -04:00
parent e30a24ff70
commit d157444877
2 changed files with 4 additions and 3 deletions
+1
View File
@@ -61,6 +61,7 @@ ENV PGID=1000
ENV UMASK=022 ENV UMASK=022
ENV DOWNLOAD_DIR=/downloads ENV DOWNLOAD_DIR=/downloads
ENV AUDIO_DOWNLOAD_DIR=/downloads
ENV STATE_DIR=/downloads/.metube ENV STATE_DIR=/downloads/.metube
ENV TEMP_DIR=/downloads ENV TEMP_DIR=/downloads
ENV PORT=8081 ENV PORT=8081
+3 -3
View File
@@ -5,8 +5,8 @@ PGID="${GID:-$PGID}"
echo "Setting umask to ${UMASK}" echo "Setting umask to ${UMASK}"
umask ${UMASK} umask ${UMASK}
echo "Creating download directory (${DOWNLOAD_DIR}), state directory (${STATE_DIR}), and temp dir (${TEMP_DIR})" echo "Creating download directory (${DOWNLOAD_DIR}), audio download directory (${AUDIO_DOWNLOAD_DIR}), state directory (${STATE_DIR}), and temp dir (${TEMP_DIR})"
mkdir -p "${DOWNLOAD_DIR}" "${STATE_DIR}" "${TEMP_DIR}" mkdir -p "${DOWNLOAD_DIR}" "${AUDIO_DOWNLOAD_DIR}" "${STATE_DIR}" "${TEMP_DIR}"
do_upgrade() { do_upgrade() {
echo "Upgrading yt-dlp to nightly channel..." echo "Upgrading yt-dlp to nightly channel..."
@@ -56,7 +56,7 @@ if [ `id -u` -eq 0 ] && [ `id -g` -eq 0 ]; then
fi fi
if [ "${CHOWN_DIRS:-true}" != "false" ]; then if [ "${CHOWN_DIRS:-true}" != "false" ]; then
echo "Changing ownership of download and state directories to ${PUID}:${PGID}" echo "Changing ownership of download and state directories to ${PUID}:${PGID}"
chown -R "${PUID}":"${PGID}" /app "${DOWNLOAD_DIR}" "${STATE_DIR}" "${TEMP_DIR}" chown -R "${PUID}":"${PGID}" /app "${DOWNLOAD_DIR}" "${AUDIO_DOWNLOAD_DIR}" "${STATE_DIR}" "${TEMP_DIR}"
fi fi
if nightly_enabled; then if nightly_enabled; then
echo "YTDL_NIGHTLY_UPDATE_TIME is set to ${YTDL_NIGHTLY_UPDATE_TIME}; upgrading yt-dlp on startup" echo "YTDL_NIGHTLY_UPDATE_TIME is set to ${YTDL_NIGHTLY_UPDATE_TIME}; upgrading yt-dlp on startup"