Use "exec python3" in docker-entrypoint.sh

To reduce the processes in metube container
This commit is contained in:
Phus Lu 2025-09-24 12:03:36 +08:00 committed by GitHub
parent 923bc9894e
commit a9894a4028
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -12,8 +12,8 @@ if [ `id -u` -eq 0 ] && [ `id -g` -eq 0 ]; then
echo "Changing ownership of download and state directories to ${UID}:${GID}"
chown -R "${UID}":"${GID}" /app "${DOWNLOAD_DIR}" "${STATE_DIR}" "${TEMP_DIR}"
echo "Running MeTube as user ${UID}:${GID}"
su-exec "${UID}":"${GID}" python3 app/main.py
exec su-exec "${UID}":"${GID}" python3 app/main.py
else
echo "User set by docker; running MeTube as `id -u`:`id -g`"
python3 app/main.py
exec python3 app/main.py
fi