1- .PHONY : help prepare doc test serve build publish-production
1+ .PHONY : help prepare doc test serve build publish-production deploy-production promote-production production
22.DEFAULT_GOAL := help
33SHELL: =/bin/bash
44
@@ -56,7 +56,7 @@ serve-oauth: ## Serve Panel dashboard - Prod mode with OAuth2. Needs: PANEL_OAU
5656# Deployment commands
5757# --progress=plain
5858
59- build-local :
59+ build-local : # # Build for local architecture
6060 docker build -f ./panel/Dockerfile \
6161 --tag simdec-panel-local:$(version ) \
6262 --pull \
@@ -77,7 +77,7 @@ run-local: build-local
7777 simdec-panel-local:$(version )
7878
7979# Need to specifically build on linux/amd64 to avoid issues on macOS M platform
80- build :
80+ build : # # Build for linux/amd64 (production)
8181 docker build -f ./panel/Dockerfile \
8282 --platform linux/amd64 \
8383 --tag simdec-panel:$(version ) \
@@ -100,11 +100,12 @@ run: build
100100
101101# Ship
102102
103- publish-production : build
103+ publish-production : build # # Tag and push to GCP
104104 docker tag simdec-panel:$(version ) $(region ) -docker.pkg.dev/$(project ) /simdec-panel/simdec-panel:$(version )
105105 docker push $(region ) -docker.pkg.dev/$(project ) /simdec-panel/simdec-panel:$(version )
106106
107- production : publish-production
107+
108+ deploy-production : publish-production # # Deploy new revision to GCP
108109 @echo " Deploying '$( version) '."
109110 gcloud run deploy simdec-panel \
110111 --cpu=2 \
@@ -124,4 +125,8 @@ production: publish-production
124125 --timeout=60m \
125126 --service-account simdec-panel@delta-entity-401706.iam.gserviceaccount.com \
126127 --image=$(region ) -docker.pkg.dev/$(project ) /simdec-panel/simdec-panel:$(version ) \
127- --memory 2Gi
128+ --memory 2Gi \
129+ --no-traffic
130+
131+ promote-production : # # Serve new revision to GCP
132+ gcloud run services update-traffic simdec-panel --to-latest
0 commit comments