A docker container for dropbox by App
MIT License
🐳 Docker synchronization container for Dropbox using a token app
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.
To use this docker is really easy:
init_dropbox_refreshToken.sh
script.docker pull rbonghi/dropbox
docker run \
-e DROPBOX_APP_KEY=<WRITE YOUR APPLICATION KEY HERE> \
-e DROPBOX_APP_SECRET=<WRITE YOUR APPLICATION SECRET HERE> \
-e DROPBOX_REFRESH_TOKEN=<WRITE YOUR REFRESH TOKEN HERE> \
-v <FOLDER YOU WANT SYNC>:/dropbox rbonghi/dropbox
How to start up the docker-dropbox app machine:
init_dropbox_refreshToken.sh
script.version: '3'
services:
dropbox:
image: rbonghi/dropbox:latest
environment:
- PYTHONUNBUFFERED=1
- DROPBOX_APP_KEY=<WRITE YOUR APPLICATION KEY HERE>
- DROPBOX_APP_SECRET=<WRITE YOUR APPLICATION SECRET HERE>
- DROPBOX_REFRESH_TOKEN=<WRITE YOUR REFRESH TOKEN HERE>
volumes:
- <FOLDER YOU WANT SYNC>:/dropbox
docker-compose up
You have two option to run the dropboxsync:
To select this option you can run the docker machine adding:
docker run -e DROPBOX_TOKEN=<WRITE YOUR TOKEN HERE> -v <FOLDER YOU WANT SYNC>:/dropbox dropbox --fromDropbox
or
version: '3'
services:
dropbox:
image: rbonghi/dropbox:latest
command: ["--fromDropbox", "-i", "120"]
environment:
- PYTHONUNBUFFERED=1
- DROPBOX_APP_KEY=<WRITE YOUR APPLICATION KEY HERE>
- DROPBOX_APP_SECRET=<WRITE YOUR APPLICATION SECRET HERE>
- DROPBOX_REFRESH_TOKEN=<WRITE YOUR REFRESH TOKEN HERE>
volumes:
- <FOLDER YOU WANT SYNC>:/dropbox
If you want launch this script without start a docker container:
python dbsync \
--rootdir <ROOT_FOLDER> \
--folder <DROPBOX_FOLDER> \
--appKey <WRITE YOUR APP KEY HERE> \
--appSecret <WRITE YOUR APP SECRET HERE> \
[options]
For [options]
: