A Docker image for exporting files to Google Drive.
docker run -d \
--name google-drive-file-exporter \
-e GOOGLE_FOLDER_ID="1dyUEebJaFnWa3Z4n0BFMVAXQ" \
-e KEEP_CONTAINER_RUNNING=true \
-v $(pwd)/files:/archive \
-v $(pwd)/service-account-credentials.json:/service-account-credentials.json:ro \
adnanjaw/google-drive-file-exporter:latest
google-drive-file-exporter:
image: adnanjaw/google-drive-file-exporter:latest
container_name: google-drive-file-exporter
environment:
GOOGLE_FOLDER_ID: "1dyUEebJaFnWa3Z4n0BFMVAXQ"
KEEP_CONTAINER_RUNNING: true
restart: unless-stopped
volumes:
- ./files:/archive
- ./service-account-credentials.json:/service-account-credentials.json:ro
Ensure that you mount the service account credentials file (service-account-credentials.json) as read-only (:ro) to maintain security.
Before you begin, make sure you have the following prerequisites:
- Docker (for local development)
- Docker compose (for local development)
- Taskfile.dev (optional)
Follow these steps to set up your development environment:
-
Clone this Repository:
git clone [email protected]:adnanjaw/google-drive-file-exporter.git google-drive-exporter cd google-drive-exporter
-
Create secrets:
cp .env.example .env
- Create a Google service account and generate a key in JSON format.
touch service-account-credentials.json
and paste the JSON key into the created file.
-
Start Docker Containers and Initialize the Application:
task up