An open API service indexing awesome lists of open source software.

https://github.com/rbonghi/docker-dropbox-app

:whale: A docker container for dropbox by App
https://github.com/rbonghi/docker-dropbox-app

backup directories docker dropbox sync syncronization

Last synced: 7 months ago
JSON representation

:whale: A docker container for dropbox by App

Awesome Lists containing this project

README

          

# docker-dropbox-app

🐳 Docker synchronization container for Dropbox using a token app


Docker Image Size (tag)
Docker Pulls
Build
CodeQL



Twitter Follow
robo.panther
Join our Discord

When your docker is ready, all files and folders will be sync in **realtime**. A watchdog check every time if a file or folder is created, deleted or modified, and will be update your dropbox folder.

If you add in your root a file `.dropboxignore` you can select witch type of file or folder you want exclude, look like your git repository.

## Start with docker

To use this docker is really easy:

1. Create your [App in dropbox](https://www.dropbox.com/developers/reference/getting-started#app%20console)
2. Generated refresh token by using `init_dropbox_refreshToken.sh` script.
3. Pull this docker

```console
docker pull rbonghi/dropbox
```

4. Run your docker

```console
docker run \
-e DROPBOX_APP_KEY= \
-e DROPBOX_APP_SECRET= \
-e DROPBOX_REFRESH_TOKEN= \
-v :/dropbox rbonghi/dropbox
```

## Start with docker-compose

How to start up the docker-dropbox app machine:

1. Create your [App in dropbox](https://www.dropbox.com/developers/reference/getting-started#app%20console)
2. Generated refresh token by using `init_dropbox_refreshToken.sh` script.
3. Write your docker-compose.yml file or add:

```yml
version: '3'
services:
dropbox:
image: rbonghi/dropbox:latest
environment:
- PYTHONUNBUFFERED=1
- DROPBOX_APP_KEY=
- DROPBOX_APP_SECRET=
- DROPBOX_REFRESH_TOKEN=
volumes:
- :/dropbox
```

4. Start your docker:

```console
docker-compose up
```

## Configuration

You have two option to run the dropboxsync:

* **--inverval** [_Default:_ 10s] Interval refresh folder from Dropbox
* **--fromLocal** Will be overwriten from your PC follder to Dropbox
* **--fromDropbox** Will be overwriten from Dropbox to your PC folder
* **--verbose** Show all debug messages

To select this option you can run the docker machine adding:

```console
docker run -e DROPBOX_TOKEN= -v :/dropbox dropbox --fromDropbox
```

or

```yml
version: '3'
services:
dropbox:
image: rbonghi/dropbox:latest
command: ["--fromDropbox", "-i", "120"]
environment:
- PYTHONUNBUFFERED=1
- DROPBOX_APP_KEY=
- DROPBOX_APP_SECRET=
- DROPBOX_REFRESH_TOKEN=
volumes:
- :/dropbox
```

## Start without docker

If you want launch this script without start a docker container:

```console
python dbsync \
--rootdir \
--folder \
--appKey \
--appSecret \
[options]
```

For `[options]`:

* **--verbose** Show in detail all steps for each sync
* **--fromLocal** or **--fromDropbox** Read [Configuration](#configuration)
* **--interval** [default=60s] The Interval to sync from Dropbox in **--fromDropbox** mode
* **--refreshToken** Set the refresh token retrieved and logged in the console at first launch or via the init_script. (This will avoid the manual acceptation step via a generated access code in the navigator)