A Python app for retrieving images from Google Photos, cropping them using the Cloudinary AI service, and syncing them with a Google Cloud Storage bucket. This application is intended to run as a Kubernetes job or a standalone cronjob.
- Retrieve images from Google Photos.
- Crop images using the Cloudinary AI service.
- Sync cropped images with a Google Cloud Storage bucket.
- Deployable as a Kubernetes job or a standalone cronjob.
The app requires the following environment variables to be set:
Environment Variable | Description |
---|---|
GOOGLE_APP_CREDENTIALS |
Path to the JSON file that contains your Google application credentials. |
IC_BUCKET_NAME |
The name of the Google Cloud Storage bucket where cropped images will be synced. |
IC_ALBUM_SECRET |
A secret key for accessing the specific album in Google Photos. |
IC_ALBUM_ID |
The ID of the album in Google Photos from which images will be retrieved. |
CLOUDINARY_URL |
The Cloudinary URL for accessing the Cloudinary API. |
- Dockerfile: Build a Docker image for the app.
- Helm Chart: Helm chart for deploying the app in a Kubernetes cluster.
- Ensure your Kubernetes cluster is up and running.
- Configure your environment variables in your values file.
- Deploy the Helm chart:
helm install image-cropper-sync ./helm
- Build the Docker image:
docker build -t image-cropper-sync .
- Run the Docker container with the necessary environment variables:
docker run -e GOOGLE_APP_CREDENTIALS=<your-google-app-credentials> \ -e IC_BUCKET_NAME=<your-bucket-name> \ -e IC_ALBUM_SECRET=<your-album-secret> \ -e IC_ALBUM_ID=<your-album-id> \ -e CLOUDINARY_URL=<your-cloudinary-url> \ image-cropper-sync
Contributions are welcome! Please submit a pull request or open an issue to discuss any changes.