Skip to content

Commit 7dda4a0

Browse files
committed
Use max 2 instances with 2 VCPU and 2GB in prod.
[skip ci]
1 parent 34ea6a7 commit 7dda4a0

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ WORKDIR /app
4242

4343
# Run the web service on container startup.
4444
CMD ["panel", "serve", "panel/app.py", \
45-
"--address", "0.0.0.0", "--port", "8080", "--num-procs", "1", "--allow-websocket-origin", "*", \
45+
"--address", "0.0.0.0", "--port", "8080", "--num-procs", "2", "--allow-websocket-origin", "*", \
4646
"--cookie-secret", "panel_cookie_secret", \
4747
"--basic-login-template", "panel/login.html", \
4848
"--logout-template", "panel/logout.html", \

Makefile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,10 @@ publish-production: build
8989
production: publish-production
9090
@echo "Deploying '$(version)'."
9191
gcloud run deploy simdec-panel \
92-
--concurrency=10 \
93-
--max-instances=1 \
92+
--cpu=2 \
93+
--concurrency=5 \
94+
--min-instances=0 \
95+
--max-instances=2 \
9496
--region=$(region) \
9597
--port=8080 \
9698
--set-env-vars ENV=production \
@@ -99,4 +101,4 @@ production: publish-production
99101
--timeout=600 \
100102
--service-account simdec-panel@delta-entity-401706.iam.gserviceaccount.com \
101103
--image=$(region)-docker.pkg.dev/$(project)/simdec-panel/simdec-panel:$(version) \
102-
--memory 1Gi
104+
--memory 2Gi

0 commit comments

Comments
 (0)