Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
FROM python:3.11-slim-buster
MAINTAINER Martin Dobias "[email protected]"
# LABEL instead of MAINTAINER (fixes deprecation warning)
LABEL maintainer="Martin Dobias <[email protected]>"

# to fix issue with mod_spatialite.so
RUN apt-get update && apt-get install -y libsqlite3-mod-spatialite && rm -rf /var/lib/apt/lists/*
# to fix issue with mod_spatialite.so and pygeodiff building
RUN apt-get update && \
apt-get install -y libsqlite3-mod-spatialite build-essential cmake libsqlite3-dev && \
rm -rf /var/lib/apt/lists/*

# istall dependencies via pipenv system-wide
# install dependencies via pipenv system-wide
RUN pip3 install --upgrade pip
RUN pip3 install pipenv
COPY Pipfile Pipfile.lock ./
Expand All @@ -15,4 +18,4 @@ WORKDIR /mergin-media-sync
COPY version.py config.py drivers.py media_sync.py media_sync_daemon.py ./

# create deafult config file (can be overridden with env variables)
COPY config.yaml.default ./config.yaml
COPY config.yaml.default ./config.yaml
8 changes: 4 additions & 4 deletions docs/google-drive-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ To set up Google Drive for use with the Google Drive API, follow these steps. Th
- In the top left corner, you should see the name of your project, or click on `Select a project` and select the project you just created.

3. **Enable Google Drive API**:
- In the left menu, click on `APIs & Services` and then `Dashboard`.
- In the left menu, click on `APIs & Services`.
- Click on `Enable APIs and Services`.
- Search for `Google Drive API`, click on it, and then click `Enable`.

4. **Create a Service Account**:
- On the left side of the screen, click on `Credentials`.
- Click on `Manage service accounts` and then `Create Service Account`.
- Click on `Create credentials` and then on `Service account`.
- Specify the name, account ID, and description, and click `Done`.
- Click on the created credentials, select the `Keys` page, and then create a new key using `Add Key`.
- Click on the created credentials, select the `Keys` page, and then create a new key using `Add Key` and then `Create new key`.
- In the following dialog, select `JSON` and click `Create`. The key will be downloaded to your computer (store it safely, as it cannot be redownloaded). In case of a lost key, you can delete it and create a new one.

The downloaded JSON file contains all the necessary information to authenticate with the Google Drive API. Provide this file to the media sync tool as the path to the file:
Expand All @@ -44,4 +44,4 @@ google_drive:
share_with: [[email protected], [email protected]]
```

This creates a `folder` in Google Drive under the `Service account`, accessible only by this specific user. To make it available to other users, use the `share_with` setting. The folder will be shared with all the email addresses specified in the list (the emails need to be Google Emails - business or free). Every user will have the same access rights as the user who created the folder and can create and delete files in the folder. For users with whom the folder is shared, it will be listed in their Google Drive under the `Shared with me` section.
This creates a `folder` in Google Drive under the `Service account`, accessible only by this specific user. To make it available to other users, use the `share_with` setting. The folder will be shared with all the email addresses specified in the list (the emails need to be Google Emails - business or free). Every user will have the same access rights as the user who created the folder and can create and delete files in the folder. For users with whom the folder is shared, it will be listed in their Google Drive under the `Shared with me` section.