dify-google-cloud-terraform  by DeNA

Deploy Dify on Google Cloud with Terraform

Created 1 year ago
252 stars

Top 99.6% on SourcePulse

GitHubView on GitHub
Project Summary

Summary

This repository provides Terraform configurations to automate the deployment of Dify on Google Cloud Platform. It targets users who need a scalable, highly available, and production-ready instance of Dify, simplifying the complex setup of cloud infrastructure. The primary benefit is a streamlined, robust deployment process for the Dify application.

How It Works

The project leverages Terraform to provision and manage Google Cloud resources. It is designed around a serverless hosting model, incorporating auto-scaling capabilities to adapt to demand and ensuring data persistence through managed cloud services. This approach automates the creation of a resilient Dify environment on GCP.

Quick Start & Requirements

  • Prerequisites: A Google Cloud account, Terraform installed, and the gcloud CLI installed.
  • Setup: Clone the repository, navigate to terraform/environments/dev, run terraform init, terraform apply -target=module.registry, execute ./docker/cloudbuild.sh <your-project-id> <your-region> to build and push container images, then run terraform plan and terraform apply.
  • Configuration: Environment-specific values must be set in terraform/environments/dev/terraform.tfvars. A critical security alert advises against committing sensitive data to Git; use environment variables (e.g., TF_VAR_...) or tools like Google Secret Manager instead.
  • State Management: A Google Cloud Storage (GCS) bucket must be created beforehand to manage Terraform state.

Highlighted Details

  • Supports Dify v1.0.0 and later versions.
  • Aims for production-level readiness with scalability and high availability.
  • Features serverless hosting and auto-scaling.
  • Ensures data persistence for critical application data.

Maintenance & Community

No specific details regarding contributors, sponsorships, or community channels (like Discord/Slack) are provided in the README.

Licensing & Compatibility

  • License: MIT License.
  • Compatibility: The MIT license generally permits commercial use and integration with closed-source projects, with standard attribution requirements.

Limitations & Caveats

Critical resources such as Cloud Storage, Cloud SQL, VPC, and VPC Peering are not automatically deleted by the terraform destroy command. These resources require manual deletion via the Google Cloud console to ensure a complete cleanup.

Health Check
Last Commit

8 months ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
1
Star History
2 stars in the last 30 days

Explore Similar Projects

Starred by Jiaming Song Jiaming Song(Chief Scientist at Luma AI), Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), and
1 more.

production-stack by vllm-project

0.3%
2k
Reference stack for production vLLM deployment on Kubernetes
Created 1 year ago
Updated 1 day ago
Feedback? Help us improve.