Skip to content

Commit

Permalink
UPDATE
Browse files Browse the repository at this point in the history
  • Loading branch information
mazzasaverio committed Feb 6, 2024
1 parent 1b50bd4 commit 0874867
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
id: meta
uses: docker/metadata-action@v4
with:
images: inter92/fastapi-cloudrun
images: inter92/youtube-auto-dub

- name: Build and push Docker image
uses: docker/build-push-action@v3
Expand Down
8 changes: 4 additions & 4 deletions cloudbuild.yaml
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
steps:
- name: "gcr.io/cloud-builders/docker"
args:
["build", "-t", "gcr.io/$PROJECT_ID/fastapi-cloudrun:latest", "./backend"]
["build", "-t", "gcr.io/$PROJECT_ID/youtube-auto-dub:latest", "./backend"]

- name: "gcr.io/cloud-builders/docker"
args: ["push", "gcr.io/$PROJECT_ID/fastapi-cloudrun:latest"]
args: ["push", "gcr.io/$PROJECT_ID/youtube-auto-dub:latest"]

- name: "gcr.io/google.com/cloudsdktool/cloud-sdk"
entrypoint: gcloud
args:
- "run"
- "deploy"
- "cloudrun-service" # Make sure this is your service name
- "--image=gcr.io/$PROJECT_ID/fastapi-cloudrun:latest"
- "--image=gcr.io/$PROJECT_ID/youtube-auto-dub:latest"
- "--region=us-central1" # Confirm this is your desired region
- "--platform=managed"
- "--allow-unauthenticated" # Consider removing if you need authentication

images:
- "gcr.io/$PROJECT_ID/fastapi-cloudrun:latest"
- "gcr.io/$PROJECT_ID/youtube-auto-dub:latest"
2 changes: 1 addition & 1 deletion terraform/modules/cloud_run/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ resource "google_cloud_run_v2_service" "default" {

template {
containers {
image = "gcr.io/${var.gcp_project_id}/fastapi-cloudrun:latest"
image = "gcr.io/${var.gcp_project_id}/youtube-auto-dub:latest"
resources {
limits = {
cpu = "2"
Expand Down
28 changes: 28 additions & 0 deletions terraform/terraform.tfvars.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/* ------------------------------ GCP Foundation----------------------------- */

gcp_project_id = "gcp_project_id"
gcp_project_number = "gcp_project_number"
gcp_credentials_file = "~/gcp_credentials_file.json"
gcp_service_account_name = "gcp_service_account_name"

gcp_services = ["cloudbuild","run","compute"]

gcp_existing_service_account_roles = [
"secretmanager.secretAccessor",
]
gcp_cloud_build_service_account_roles = ["secretmanager.secretAccessor","iam.serviceAccountUser", "compute.admin", "run.admin"]


/* ------------------------------ GCP Network ----------------------------- */
gcp_network_name = "default"
gcp_region = "us-central1"
gcp_zone = "us-central1-c"


/* ------------------------------- Cloud Build ------------------------------ */
repo_name = "repo_name"
branch = "master"

github_token = "github_token"
github_gcp_installation_id = "github_gcp_installation_id"
github_remote_uri =

0 comments on commit 0874867

Please sign in to comment.