-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
24 lines (16 loc) · 753 Bytes
/
Copy pathDockerfile
File metadata and controls
24 lines (16 loc) · 753 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
FROM python:3.13-slim
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
# Match Cloud Run's default routing port
EXPOSE 8080
# 'fastapi run' dynamically reads the $PORT env variable injected by Cloud Run
CMD ["fastapi", "run", "main.py", "--host", "0.0.0.0", "--port", "8080"]
# gcloud auth login
# gcloud config set project gen-lang-client-0854258586
# gcloud config set run/region asia-south1
# gcloud run deploy SERVICE_NAME --source . --port 8080 --allow-unauthenticated --region=asia-south1
# gcloud run services delete fastapp --region=asia-south1
# gcloud artifacts repositories delete cloud-run-source-deploy --region=asia-south1
# gcloud run services describe fastapp --region=asia-south1