added deployment

This commit is contained in:
evanpelle
2024-08-13 20:07:20 -07:00
parent efd5f65787
commit 001722bd59
11 changed files with 90 additions and 70 deletions
Regular → Executable
+4 -4
View File
@@ -1,20 +1,20 @@
#!/bin/bash
# Ensure you're authenticated with Google Cloud
gcloud auth configure-docker
gcloud auth configure-docker us-central1-docker.pkg.dev
# Build the new Docker image
docker build -t openfrontio .
# Tag the new image (use a version number or 'latest')
docker tag openfrontio gcr.io/[YOUR-PROJECT-ID]/openfrontio:latest
docker tag openfrontio us-central1-docker.pkg.dev/openfrontio/openfrontio/game-server:latest
# Push the new image to Google Container Registry
docker push gcr.io/[YOUR-PROJECT-ID]/openfrontio:latest
docker push us-central1-docker.pkg.dev/openfrontio/openfrontio/game-server:latest
# Update the GCE instance with the new container image
gcloud compute instances update-container openfrontio-instance \
--container-image us-central1-docker.pkg.dev/openfrontio/openfrontio:latest \
--container-image us-central1-docker.pkg.dev/openfrontio/openfrontio/game-server:latest \
--zone=us-central1-a
echo "Deployment complete. New version should be live soon."