mirror of
https://github.com/abraunegg/onedrive
synced 2026-03-14 14:35:46 +01:00
feat: optionally use standalone mode for syncing using Docker container (#3018)
* feat: optionally use standalone mode for syncing using Docker container * Update podman.md * Update podman.md --------- Co-authored-by: abraunegg <alex.braunegg@gmail.com>
This commit is contained in:
parent
44d639cbe1
commit
c7f1b7f407
3 changed files with 14 additions and 1 deletions
|
|
@ -34,9 +34,20 @@ else
|
|||
fi
|
||||
|
||||
# Default parameters
|
||||
ARGS=(--monitor --confdir /onedrive/conf --syncdir /onedrive/data)
|
||||
ARGS=(--confdir /onedrive/conf --syncdir /onedrive/data)
|
||||
echo "# Base Args: ${ARGS}"
|
||||
|
||||
# Tell client to use Standalone Mode, based on an environment variable. Otherwise Monitor Mode is used.
|
||||
if [ "${ONEDRIVE_SYNC_ONCE:=0}" == "1" ]; then
|
||||
echo "# We run in Standalone Mode"
|
||||
echo "# Adding --sync"
|
||||
ARGS=(--sync ${ARGS[@]})
|
||||
else
|
||||
echo "# We run in Monitor Mode"
|
||||
echo "# Adding --monitor"
|
||||
ARGS=(--monitor ${ARGS[@]})
|
||||
fi
|
||||
|
||||
# Make Verbose output optional, based on an environment variable
|
||||
if [ "${ONEDRIVE_VERBOSE:=0}" == "1" ]; then
|
||||
echo "# We are being verbose"
|
||||
|
|
|
|||
|
|
@ -287,6 +287,7 @@ docker run $firstRun --restart unless-stopped --name onedrive -v onedrive_conf:/
|
|||
| <B>ONEDRIVE_DISABLE_UPLOAD_VALIDATION</B> | Controls "--disable-upload-validation" option. Default is 0 | 1 |
|
||||
| <B>ONEDRIVE_SYNC_SHARED_FILES</B> | Controls "--sync-shared-files" option. Default is 0 | 1 |
|
||||
| <B>ONEDRIVE_RUNAS_ROOT</B> | Controls if the Docker container should be run as the 'root' user instead of 'onedrive' user. Default is 0 | 1 |
|
||||
| <B>ONEDRIVE_SYNC_ONCE</B> | Controls if the Docker container should be run in Standalone Mode. It will use Monitor Mode otherwise. Default is 0 | 1 |
|
||||
|
||||
### Environment Variables Usage Examples
|
||||
**Verbose Output:**
|
||||
|
|
|
|||
|
|
@ -304,6 +304,7 @@ podman run -it --name onedrive_work --user "${ONEDRIVE_UID}:${ONEDRIVE_GID}" \
|
|||
| <B>ONEDRIVE_DISABLE_UPLOAD_VALIDATION</B> | Controls "--disable-upload-validation" option. Default is 0 | 1 |
|
||||
| <B>ONEDRIVE_SYNC_SHARED_FILES</B> | Controls "--sync-shared-files" option. Default is 0 | 1 |
|
||||
| <B>ONEDRIVE_RUNAS_ROOT</B> | Controls if the Docker container should be run as the 'root' user instead of 'onedrive' user. Default is 0 | 1 |
|
||||
| <B>ONEDRIVE_SYNC_ONCE</B> | Controls if the Docker container should be run in Standalone Mode. It will use Monitor Mode otherwise. Default is 0 | 1 |
|
||||
|
||||
### Environment Variables Usage Examples
|
||||
**Verbose Output:**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue