Skip to content
Snippets Groups Projects
Commit 2223366d authored by Daniel Bimschas's avatar Daniel Bimschas
Browse files

HOLI-2705: add voltastics mock deployment reference

parent 494c33d9
No related branches found
No related tags found
No related merge requests found
......@@ -6,3 +6,9 @@ nodenv install -s $(cat .node-version)
# alternative using nvm
# . ~/.nvm/nvm.sh # load nvm command
# nvm use
export OKUNA_URL=http://127.0.0.1:8000/graphql
export DONATIONS_API_URL=http://127.0.0.1:8001/graphql
export GOODNEWS_API_URL=http://127.0.0.1:8002/graphql
export GEO_API_URL=http://127.0.0.1:8003/graphql
export VOLUNTEERING_API_URL=http://127.0.0.1:8004/graphql
\ No newline at end of file
......@@ -45,6 +45,7 @@ sources:
handler:
openapi:
source: ./holi-voltastics-mock-openapi.yml
baseUrl: "{env.VOLUNTEERING_API_URL}"
operationHeaders:
x-voltastics-token: "{env.VOLTASTICS_API_TOKEN}"
transforms:
......
......@@ -3,8 +3,8 @@
"version": "1.0.0",
"type": "module",
"scripts": {
"dev": "OKUNA_URL=${OKUNA_URL:-http://127.0.0.1:8000/graphql} DONATIONS_API_URL=${DONATIONS_API_URL:-http://127.0.0.1:8001/graphql} GOODNEWS_API_URL=${GOODNEWS_API_URL:-http://127.0.0.1:8002/graphql} GEO_API_URL=${GEO_API_URL:-http://127.0.0.1:8003/graphql} DEBUG=1 mesh dev --port=4000",
"start": "OKUNA_URL=${OKUNA_URL:-https://staging.unified.apis.project-holi.org/graphql} DONATIONS_API_URL=${DONATIONS_API_URL:-https://staging.unified.apis.project-holi.org/graphql} GOODNEWS_API_URL=${GOODNEWS_API_URL:-https://staging.unified.apis.project-holi.org/graphql} GEO_API_URL=${GEO_API_URL:-https://staging.unified.apis.project-holi.org/graphql} DEBUG=1 mesh dev --port=4000",
"dev": "OKUNA_URL=${OKUNA_URL:-http://127.0.0.1:8000/graphql} DONATIONS_API_URL=${DONATIONS_API_URL:-http://127.0.0.1:8001/graphql} GOODNEWS_API_URL=${GOODNEWS_API_URL:-http://127.0.0.1:8002/graphql} GEO_API_URL=${GEO_API_URL:-http://127.0.0.1:8003/graphql} VOLUNTEERING_API_URL=${VOLUNTEERING_API_URL:-http://127.0.0.1:8004/graphql} DEBUG=1 mesh dev --port=4000",
"start": "OKUNA_URL=${OKUNA_URL:-https://staging.unified.apis.project-holi.org/graphql} DONATIONS_API_URL=${DONATIONS_API_URL:-https://staging.unified.apis.project-holi.org/graphql} GOODNEWS_API_URL=${GOODNEWS_API_URL:-https://staging.unified.apis.project-holi.org/graphql} GEO_API_URL=${GEO_API_URL:-https://staging.unified.apis.project-holi.org/graphql} VOLUNTEERING_API_URL=${VOLUNTEERING_API_URL:-https://staging.unified.apis.project-holi.org/graphql} DEBUG=1 mesh dev --port=4000",
"lint": "echo 'nothing to be linted ATM'",
"test": "echo 'unit testing goes here'",
"clean": "echo 'nothing to be done'",
......
......@@ -58,6 +58,10 @@ resource "google_cloud_run_service" "unified_api" {
name = "GEO_API_URL"
value = local.geo_api_url
}
env {
name = "VOLUNTEERING_API_URL"
value = local.volunteering_api_url
}
resources {
limits = {
......
......@@ -53,6 +53,14 @@ data "terraform_remote_state" "holi_geo_api_common_state" {
}
}
data "terraform_remote_state" "holi_volunteering_api_common_state" {
backend = "gcs"
config = {
bucket = "holi-shared-terraform-state"
prefix = "volunteering-api-common"
}
}
# provider google including beta features
provider "google" {
region = "europe-north1"
......
......@@ -4,8 +4,9 @@ locals {
# the dns name can be at most 64 chars in total. The environment passed in via gitlab is max 24 chars (CI_ENVIRONMENT_SLUG).
dns_name = "${local.environment}.${data.terraform_remote_state.holi_unified_api_common_state.outputs.dns_unified_api_domain}"
okuna_url = "https://${local.environment == "production" ? "production" : "staging"}.${data.terraform_remote_state.holi_okuna_common_state.outputs.dns_okuna_domain}/graphql"
donations_api_url = "https://${local.environment == "production" ? "production" : "staging"}.${data.terraform_remote_state.holi_donations_api_common_state.outputs.dns_donations_api_domain}/graphql"
goodnews_api_url = "https://${local.environment == "production" ? "production" : "staging"}.${data.terraform_remote_state.holi_goodnews_api_common_state.outputs.dns_goodnews_api_domain}/graphql"
geo_api_url = "https://${local.environment == "production" ? "production" : "staging"}.${data.terraform_remote_state.holi_geo_api_common_state.outputs.dns_geo_api_domain}/graphql"
okuna_url = "https://${local.environment == "production" ? "production" : "staging"}.${data.terraform_remote_state.holi_okuna_common_state.outputs.dns_okuna_domain}/graphql"
donations_api_url = "https://${local.environment == "production" ? "production" : "staging"}.${data.terraform_remote_state.holi_donations_api_common_state.outputs.dns_donations_api_domain}/graphql"
goodnews_api_url = "https://${local.environment == "production" ? "production" : "staging"}.${data.terraform_remote_state.holi_goodnews_api_common_state.outputs.dns_goodnews_api_domain}/graphql"
geo_api_url = "https://${local.environment == "production" ? "production" : "staging"}.${data.terraform_remote_state.holi_geo_api_common_state.outputs.dns_geo_api_domain}/graphql"
volunteering_api_url = "https://${local.environment == "production" ? "production" : "staging"}.${data.terraform_remote_state.holi_volunteering_api_common_state.outputs.dns_volunteering_api_domain}/graphql"
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment