Skip to content

Commit

Permalink
Set envvars in a file for some reason.
Browse files Browse the repository at this point in the history
  • Loading branch information
anybodys committed Jul 6, 2024
1 parent f2963a1 commit 6ffb259
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 16 deletions.
1 change: 1 addition & 0 deletions client/.env.prod
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
REACT_APP_API_BASE_URL=https://api.kmdcodes.com/
2 changes: 1 addition & 1 deletion client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"scripts": {
"start": "react-scripts start",
"start:local": "env-cmd -f .env.local npm run-script start",
"build": "react-scripts build",
"build": "env-cmd -f .env.prod react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
Expand Down
2 changes: 1 addition & 1 deletion client/src/api.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
function getUrl(path) {
const baseUrl = process.env.REACT_APP_VOTING_API_BASE_URL;
const baseUrl = process.env.REACT_APP_API_BASE_URL;
return baseUrl + path;
}

Expand Down
13 changes: 0 additions & 13 deletions infra/app/app.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,6 @@ resource "google_cloud_run_v2_service" "client" {
ports {
container_port = 3000
}

env {
name = "ENV"
value = "prod"
}
env {
name = "GOOGLE_CLOUD_PROJECT"
value = var.project
}
env {
name = "REACT_APP_VOTING_API_BASE_URL"
value = "https://${local.api_domain}"
}
}

service_account = google_service_account.client.email
Expand Down
2 changes: 1 addition & 1 deletion infra/app/variables.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
variable "app_versions" {
type = map(string)
default = {
client : "0.2.1",
client : "0.2.1.p0",
api : "0.1.1",
}

Expand Down

0 comments on commit 6ffb259

Please sign in to comment.