-
Notifications
You must be signed in to change notification settings - Fork 0
feat: Add cloud deployment with Pulumi, Docker, and Kubernetes #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This commit introduces a complete cloud deployment solution for the application on Google Cloud Platform (GCP). The key additions are: - A Pulumi script (`__main__.py`) to provision a GCP Compute Engine instance (`e2-standard-2`) with Docker and k3s installed via a startup script. It also configures the necessary firewall rules. - Dockerfiles for both the backend (`Dockerfile.backend`) and frontend (`Dockerfile.frontend`) to containerize the application components. - A Kubernetes manifest file (`k8s.yml`) that defines the deployments, services, and an ingress resource for routing traffic to the frontend and backend. - Updated documentation (`README.md`) with a new section explaining the entire cloud deployment process, from infrastructure provisioning to application deployment. This setup provides a scalable and reproducible environment for hosting the application.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This commit introduces several improvements to the security and robustness of the cloud deployment configuration. Key changes: - **Kubernetes Manifests (`k8s.yml`):** - Fixed a routing issue in the Ingress configuration by replacing the incorrect `stripPrefix` middleware with a standard `rewrite-target`. - Added `livenessProbe` and `readinessProbe` to the frontend and backend deployments to improve reliability and automated recovery. - Added `securityContext` to pods to enforce running as non-root users and dropping all Linux capabilities, following security best practices. - **Pulumi Script (`__main__.py`):** - Now creates a dedicated GCP Service Account for the Compute Engine instance instead of using the default one. - The new service account is granted a minimal set of permissions (for logging, monitoring, and GCR access), adhering to the principle of least privilege.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds comprehensive cloud deployment capabilities to the Proposal Master application, enabling deployment to Google Cloud Platform using modern DevOps practices. The implementation includes infrastructure-as-code with Pulumi, containerization with Docker, and orchestration with Kubernetes.
- Infrastructure provisioning using Pulumi to create a GCP VM with k3s Kubernetes
- Containerization of both frontend and backend components with optimized Dockerfiles
- Complete Kubernetes manifests for production-ready deployment with proper security configurations
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
__main__.py |
Pulumi infrastructure code to provision GCP VM with k3s, service accounts, and firewall rules |
k8s.yml |
Kubernetes manifests defining namespace, deployments, services, and ingress for both frontend and backend |
Dockerfile.backend |
Multi-stage Docker build for the Python FastAPI backend application |
Dockerfile.frontend |
Multi-stage Docker build for the React frontend with Nginx serving |
README.md |
Comprehensive documentation for cloud deployment process and prerequisites |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This change adds all the necessary files and documentation to deploy the application to a Google Cloud VM running k3s, managed by Pulumi. It includes Pulumi infrastructure-as-code, Dockerfiles for containerization, and Kubernetes manifests for orchestration.