Skip to content

Commit

Permalink
chore: add local Spring Boot profile (#1545)
Browse files Browse the repository at this point in the history
* add local profile for unathenticated testing

* update web README
  • Loading branch information
davidgamez authored Jul 31, 2023
1 parent 7bfbe59 commit ad8b062
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
7 changes: 4 additions & 3 deletions web/service/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,8 @@ Both `gtfs-validator-user-uploads` and `gtfs-validator-results` have been config

## Local Development

A google cloud credentials file is requierd to start the web service. Either complete the steps above to provision a new Google Cloud project or reach out to the maintainers of the project to be granted access to the production instance credentials.
To start the web service fully integrated with a Google Cloud Platform project a valid Google cloud credentials file is required to start the web service. Either complete the steps above to provision a new Google Cloud project or reach out to the maintainers of the project to be granted access to the production instance credentials.
To start the web service without a Google cloud integration, use the `local` Spring Boot profile. To start the web service using the local profile add the following JVM parameters to the starting script, `-Dspring.profiles.active=local`.

The location of credential key file is located in `web/service/src/main/resources/application.properties`.

Expand All @@ -136,6 +137,6 @@ gcloud builds submit

## Open API Spec

:warning: **Subject to change**: This API spec may change at any time. We do not reccomend building any production systems that depend on this API directly.
:warning: **Subject to change**: This API spec may change at any time. We do not recommend building any production systems that depend on this API directly.

Open API Spec V3 documentation is avaliable at `web/service/open-api-spec.json`.
Open API Spec V3 documentation is available at `web/service/open-api-spec.json`.
5 changes: 5 additions & 0 deletions web/service/src/main/resources/application-local.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
## GCP
# Set your local credentials file
spring.cloud.gcp.credentials.location=classpath:local-not-real-credentials.json
spring.cloud.gcp.project-id=web-based-gtfs-validator-local
logging.level.org.springframework.web=INFO
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"type": "service_account",
"private_key_id": "abc",
"private_key": "-----BEGIN PRIVATE KEY-----\nMIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDY3E8o1NEFcjMM\nHW/5ZfFJw29/8NEqpViNj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uU2VATtzJSydrWm0J4wUPJifNBa/hVW\ndcqmAzXC9xznt5AVa3wxHBOfyKaE+ig8CSsjNyNZ3vbmr0X04FoV1m91k2TeXNod\njMTobkPThaNm4eLJMN2SQJuaHGTGERWC0l3T18t+/zrDMDCPiSLX1NAvAoGBAN1T\nVLJYdjvIMxf1bm59VYcepbK7HLHFkRq6xMJMZbtG0ryraZjUzYvB4q4VjHk2UDiC\nlhx13tXWDZH7MJtABzjyg+AI7XWSEQs2cBXACos0M4Myc6lU+eL+iA+OuoUOhmrh\nqmT8YYGu76/IBWUSqWuvcpHPpwl7871i4Ga/I3qnAoGBANNkKAcMoeAbJQK7a/Rn\nwPEJB+dPgNDIaboAsh1nZhVhN5cvdvCWuEYgOGCPQLYQF0zmTLcM+sVxOYgfy8mV\nfbNgPgsP5xmu6dw2COBKdtozw0HrWSRjACd1N4yGu75+wPCcX/gQarcjRcXXZeEa\nNtBLSfcqPULqD+h7br9lEJio\n-----END PRIVATE KEY-----\n",
"client_email": "123-abc@developer.gserviceaccount.com",
"client_id": "123-abc.apps.googleusercontent.com",
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
"token_uri": "http://localhost:8080/token"
}

0 comments on commit ad8b062

Please sign in to comment.