-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
feat: Add deploy into Cloud Run service support #1580
base: main
Are you sure you want to change the base?
feat: Add deploy into Cloud Run service support #1580
Conversation
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.
Hi team,
I'm currently reviewing this pull request and will have a full review ready in a few minutes. In the meantime, here's a quick summary to get everyone up to speed:
This pull request, authored by zorrofox, adds support for deploying the websocket-demo-app into a Cloud Run service. The intent is to provide a streamlined deployment process for this application.
Here's a breakdown of the changes:
gemini/multimodal-live-api/websocket-demo-app/Dockerfile
: This file has been completely rewritten to create a Docker image based onnginx:alpine
. It includes instructions to install Python 3, pip, copy frontend and backend code, installsupervisord
, install project dependencies (requirements.txt
), and copy thesupervisord.conf
andnginx.conf
files. The final command startssupervisord
to manage the application processes.- Lines 1-21: The entire Dockerfile is new, setting up the environment for the application to run in Cloud Run.
gemini/multimodal-live-api/websocket-demo-app/README.md
: This file has been updated with detailed instructions on how to deploy the application to Cloud Run. This includes steps for modifying the frontend code, deploying withgcloud
, obtaining a Google Cloud access token, and interacting with the deployed application.- Lines 168-220: A new section, "Setup in Cloud Run," has been added, providing a comprehensive guide for deployment.
gemini/multimodal-live-api/websocket-demo-app/nginx.conf
: This file defines the Nginx configuration for the application, including a reverse proxy for the WebSocket connection to the backend application running on port 8080.- Lines 1-43: The entire file is new, configuring Nginx to serve the frontend and proxy WebSocket connections.
gemini/multimodal-live-api/websocket-demo-app/supervisord.conf
: This file configuressupervisord
to manage the Nginx and Python application processes.- Lines 1-9: The entire file is new, setting up
supervisord
to manage Nginx and the backend Python application.
- Lines 1-9: The entire file is new, setting up
Overall, this PR significantly improves the deployability of the websocket-demo-app, making it easier to run in a Cloud Run environment. The added documentation is clear and comprehensive.
And now, a little haiku to lighten the mood:
Cloud Run's swift grace,
Deploys code with gentle ease,
Smooth workflow unfolds.
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.
This pull request adds support for deploying the websocket demo app to Cloud Run. This enhances the accessibility of the demo and simplifies the setup process for users. The changes are well-structured and the documentation is clear. A few minor improvements can further enhance the clarity and completeness of the documentation, and a suggestion for the Dockerfile can improve security and maintainability.
- README.md: The instructions for setting up the application in Cloud Run can be improved by clarifying the purpose of certain steps and providing more context. There's also a repeated section that should be removed for conciseness.
- Dockerfile: Using a multi-stage build can significantly reduce the final image size, which improves build times, reduces the attack surface, and optimizes resource utilization in Cloud Run.
- nginx.conf and supervisord.conf: These configuration files are well-structured and effectively support the deployment to Cloud Run. No major issues found.
Does anyone can review this? Thanks! |
Description
Thank you for opening a Pull Request!
Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
CONTRIBUTING
Guide.CODEOWNERS
for the file(s).nox -s format
from the repository root to format).Fixes #<issue_number_goes_here> 🦕