Make your Streamlit chatbot accessible to your team via a URL.
app.pyrequirements.txt (all dependencies: streamlit, vertexai, python-dotenv, etc.)git init git add . git commit -m "Initial commit" git branch -M main git remote add origin https://github.com/yourusername/your-chatbot.git git push -u origin main
https://your-chatbot.streamlit.apprequirements.txt.https://cloud.google.com/sdk/docs/install
gcloud auth login gcloud config set project YOUR_PROJECT_ID
Dockerfile in your project root:
# Use official Python base image
FROM python:3.12-slim
# Set working directory
WORKDIR /app
# Copy files
COPY . /app
# Install dependencies
RUN pip install --upgrade pip
RUN pip install -r requirements.txt
# Expose Streamlit port
EXPOSE 8501
# Command to run
CMD ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]
gcloud builds submit --tag gcr.io/YOUR_PROJECT_ID/chatbot
gcloud run deploy chatbot \ --image gcr.io/YOUR_PROJECT_ID/chatbot \ --platform managed \ --region us-central1 \ --allow-unauthenticated
https://chatbot-xxxxxx-uc.a.run.app.env with GCP credentials is either in Cloud Secrets or replaced by ADC (Application Default Credentials) when deploying.streamlit logs gcloud logs read --project YOUR_PROJECT_ID
requirements.txt updated with all packages.streamlit run app.py
| Step | Done? |
|---|---|
| Push project to GitHub | |
| Streamlit Cloud: Deploy App | |
| Cloud Run: Docker build & deploy | |
| Test URL on browser | |
| Ensure GCP authentication works | |
| Check logs if error occurs |