Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ports and config to use local nginx for dev #839

Merged
merged 2 commits into from
Feb 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ case class ApiConfig(
) {
// Used to determine whether we're running in a dev environment
def environment: ApiEnvironment = publicHost match {
case "localhost" => ApiEnvironment.Dev
case _ if publicHost.contains("stage") => ApiEnvironment.Stage
case _ => ApiEnvironment.Prod
case _ if publicHost.contains("api-dev") => ApiEnvironment.Dev
case _ if publicHost.contains("api-stage") => ApiEnvironment.Stage
case _ => ApiEnvironment.Prod
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class ApiConfigTest extends AnyFunSpec with Matchers with Inside {
}

it("correctly identifies a dev environment") {
val publicRoot = "https://localhost:8080/catalogue/v2"
val publicRoot = "https://api-dev.wellcomecollection.org/catalogue/v2"
inside(
ApiConfig(
publicRootUri = Uri(publicRoot),
Expand All @@ -48,7 +48,7 @@ class ApiConfigTest extends AnyFunSpec with Matchers with Inside {
) {
case apiConfig@ApiConfig(publicScheme, publicHost, publicRootPath, _) =>
publicScheme shouldBe "https"
publicHost shouldBe "localhost"
publicHost shouldBe "api-dev.wellcomecollection.org"
publicRootPath shouldBe "/catalogue/v2"
apiConfig.environment shouldBe ApiEnvironment.Dev
}
Expand Down
2 changes: 1 addition & 1 deletion concepts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"license": "MIT",
"scripts": {
"start": "NODE_ENV=production ts-node-transpile-only ./server.ts",
"dev": "NODE_ENV=development nodemon ./server.ts",
"dev": "AWS_PROFILE=catalogue-developer PORT=3001 NODE_ENV=development nodemon ./server.ts",
"test": "jest"
},
"dependencies": {
Expand Down
4 changes: 2 additions & 2 deletions items/src/main/resources/application.conf
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ content.api.publicRoot="https://api.wellcomecollection.org/content/v0"
content.api.publicRoot=${?content_api_public_root}

http.host="0.0.0.0"
http.port=8080
http.port=8081
http.port=${?app_port}
http.externalBaseURL="http://localhost:8080/"
http.externalBaseURL="http://localhost:8081/"
http.externalBaseURL=${?app_base_url}

aws.metrics.namespace=${?metrics_namespace}
Expand Down
2 changes: 1 addition & 1 deletion search/src/main/resources/application.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
api.public-root="http://localhost"
api.public-root="https://api-dev.wellcomecollection.org/catalogue/v2"
api.public-root=${?api_public_root}
apm.server.url=${?apm_server_url}
apm.secret=${?apm_secret}
Expand Down