Add ability to skip chown /data folder (#233)

* Add env FIX_DATA_VOLUME_PERMISSIONS to allow user to choose whether to chown the data folder

* Add another log
This commit is contained in:
2023-04-20 13:38:50 +10:00
committed by GitHub
parent 7597acf095
commit 1e6c8855da
3 changed files with 10 additions and 2 deletions
+1
View File
@@ -39,6 +39,7 @@ ENV RCLONE_AUTO_UPLOAD_PROVIDER=
ENV RCLONE_AUTO_UPLOAD_REMOTE_PATH=/downloads
ENV RCLONE_AUTO_UPLOAD_FILE_MIN_SIZE=1K
ENV RCLONE_AUTO_UPLOAD_FILE_MAX_SIZE=100G
ENV FIX_DATA_VOLUME_PERMISSIONS=false
ADD install.sh aria2c.sh caddy.sh Procfile init.sh start.sh rclone.sh new-version-checker.sh APP_VERSION /app/
ADD conf /app/conf
+1
View File
@@ -139,6 +139,7 @@ Then simply run `docker-compose up -d`, that's it!
| `RCLONE_AUTO_UPLOAD_REMOTE_PATH` | The file folder in remote cloud storage provider, default `/downloads`|
| `RCLONE_AUTO_UPLOAD_FILE_MIN_SIZE` | Set the minimum file size of auto uploader, files smaller than it won't be uploaded, default `1K` |
| `RCLONE_AUTO_UPLOAD_FILE_MAX_SIZE` | Set the limit of the Max file can be uploaded to 3rd party storage provider, default `100G`. |
| `FIX_DATA_VOLUME_PERMISSIONS` | Default value is `false`. When set to `true`, the container will run `chown -R` command against `/data` folder and `PUID` and `PGID` you set. Please set it to `true` when container complains you don't have enough permissions to manage the files and folders you mounted.|
### Supported Volumes
+8 -2
View File
@@ -8,13 +8,19 @@ mkdir -p /app/.caddy
mkdir -p /app/.cache
mkdir -p /app/.cache/aria2
echo "[INFO] Run chown against app related folders and user ${PUID}"
chown -R junv:junv \
/app \
/app/.caddy \
/app/.cache \
/usr/local \
/var/log \
/data
/var/log
if [[ "${FIX_DATA_VOLUME_PERMISSIONS}" = "true" ]]; then
echo "[INFO] Setup user ${PUID} proper permissions for /data"
chown -R junv:junv /data
fi
chmod +x /app/caddy.sh \
/app/rclone.sh \