https://github.com/hadim/docker-insync
A Docker image to sync a Google Drive on disk using Insync and s6-overlay.
https://github.com/hadim/docker-insync
Last synced: 4 months ago
JSON representation
A Docker image to sync a Google Drive on disk using Insync and s6-overlay.
- Host: GitHub
- URL: https://github.com/hadim/docker-insync
- Owner: hadim
- License: mit
- Created: 2019-10-22T17:25:13.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-07-19T15:47:08.000Z (almost 6 years ago)
- Last Synced: 2025-03-15T14:01:44.905Z (about 1 year ago)
- Language: Dockerfile
- Homepage:
- Size: 8.79 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# docker-insync
[](https://hub.docker.com/r/hadim/docker-insync 'DockerHub')
[](https://hub.docker.com/r/hadim/docker-insync 'DockerHub')
[](https://hub.docker.com/r/hadim/docker-insync 'DockerHub')
[](https://microbadger.com/images/hadim/docker-insync "MicroBadger")
A Docker image to sync a Google Drive on disk using [Insync](https://www.insynchq.com/) and [`s6-overlay`](https://github.com/just-containers/s6-overlay).
*Note: This Docker image is inspired from https://github.com/tiredofit/docker-insync.*
## How to use
### Docker Hub
Use the following `docker-compose.yml` file:
```yaml
version: '3'
services:
insync:
container_name: insync
image: hadim/docker-insync
restart: unless-stopped
environment:
TIMEZONE: "America/Montreal"
PUID: 1000
PGID: 1000
INSYNC_1_USERNAME: $DRIVE_USERNAME
INSYNC_1_AUTH_CODE: $DRIVE_TOKEN
INSYNC_1_DOWNLOAD: "ms-office"
INSYNC_1_DISABLE_SYNC: >
root:,
root:,
root:,
INSYNC_1_ENABLE_SYNC: >
root:,
root:
volumes:
- ../Drive:/data
```
### Cloning
You need to clone this repository and build the repository:
```bash
git clone https://github.com/hadim/docker-insync.git
cd docker-insync/
docker-compose build
```
Edit `docker-compose.yml`. Then run the container:
```bash
docker-compose up -d
docker-compose logs -f insync
```
## Configurations
### Data Volumes
| Directory | Description |
| --- | --- |
| `/data` | Backup and Configuration Directory |
### Environment Variables
| Parameter | Description | Default |
| --- | --- | --- |
| `TIMEZONE` | [Timezone string](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) | `"America/Montreal"` |
| `PUID` | User ID (use `id $USER`) | `1000` |
| `PGID` | Group ID (use `id $USER`) | `1000` |
| `INSYNC_1_USERNAME` | Google Drive username (email) | `$DRIVE_USERNAME` |
| `INSYNC_1_AUTH_CODE` | [Google Drive Auth Token](https://insynchq.com/auth) | `$DRIVE_TOKEN` |
| `INSYNC_1_DOWNLOAD` | How to download Office files: `link` (.gdoc), `ms-office` (.docx), `open-document` (.odt) | `"ms-office"` |
| `INSYNC_1_DISABLE_SYNC` | List of folder IDs separated by a comma to exclude. | |
| `INSYNC_1_ENABLE_SYNC` | List of folder IDs separated by a comma to include. | |
You can also define `INSYNC_2_USERNAME`, `INSYNC_3_USERNAME` and so forth to sync multiple users.
## License
[MIT License](./LICENSE).
## Author
- [Hadrien Mary](https://github.com/hadim)