Skip to content

Commit

Permalink
FORMS-1594 - rename local.json.sample (#1564)
Browse files Browse the repository at this point in the history
* FORMS-1594 - rename local.json.sample

Rename file so json prettier will keep the sample formatted and correct.

Signed-off-by: Jason Sherman <[email protected]>

* clean up gitignore, fix script from merge

Signed-off-by: Jason Sherman <[email protected]>

* Update .devcontainer/README.md

Co-authored-by: Walter Moar <[email protected]>

---------

Signed-off-by: Jason Sherman <[email protected]>
Co-authored-by: Walter Moar <[email protected]>
  • Loading branch information
usingtechnology and WalterMoar authored Jan 7, 2025
1 parent faea4c4 commit a0285a6
Show file tree
Hide file tree
Showing 5 changed files with 114 additions and 118 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ CHEFS API and Frontend are running as node applications on the devcontainer - ag

### Configuring CHEFS locally

When the devcontainer is built, it copies `.devcontainer/chefs_local/local.json.sample` to `.devcontainer/chefs_local/local.json`. This copy is not checked in and allows the developer to make changes and tweaks without impacting other developers or accidentially committing passwords.
When the devcontainer is built, it copies `.devcontainer/chefs_local/local.sample.json` to `.devcontainer/chefs_local/local.json`. This copy is not checked in and allows the developer to make changes and tweaks without impacting other developers or accidentially committing passwords.

### Authorization Prerequisites

Expand Down
112 changes: 0 additions & 112 deletions .devcontainer/chefs_local/local.json.sample

This file was deleted.

111 changes: 111 additions & 0 deletions .devcontainer/chefs_local/local.sample.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
{
"db": {
"database": "chefs",
"host": "localhost",
"port": "5432",
"username": "app",
"password": "admin"
},
"files": {
"uploads": {
"enabled": "true",
"fileCount": "1",
"fileKey": "files",
"fileMaxSize": "25MB",
"fileMinSize": "0KB",
"path": "files"
},
"permanent": "localStorage",
"localStorage": {
"path": "myfiles"
},
"objectStorage": {
"accessKeyId": "bcgov-citz-ccft",
"bucket": "chefs",
"endpoint": "https://commonservices.objectstore.gov.bc.ca",
"key": "chefs/dev/",
"secretAccessKey": "anything"
}
},
"frontend": {
"apiPath": "api/v1",
"basePath": "/app",
"oidc": {
"clientId": "chefs-frontend-localhost-5300",
"realm": "standard",
"serverUrl": "https://dev.loginproxy.gov.bc.ca/auth",
"logoutUrl": "https://logon7.gov.bc.ca/clp-cgi/logoff.cgi?retnow=1&returl=https%3A%2F%2Fdev.loginproxy.gov.bc.ca%2Fauth%2Frealms%2Fstandard%2Fprotocol%2Fopenid-connect%2Flogout"
}
},
"server": {
"apiPath": "/api/v1",
"basePath": "/app",
"bodyLimit": "30mb",
"oidc": {
"realm": "standard",
"serverUrl": "https://dev.loginproxy.gov.bc.ca/auth",
"jwksUri": "https://dev.loginproxy.gov.bc.ca/auth/realms/standard/protocol/openid-connect/certs",
"issuer": "https://dev.loginproxy.gov.bc.ca/auth/realms/standard",
"audience": "chefs-frontend-localhost-5300",
"maxTokenAge": "300"
},
"logLevel": "http",
"port": "8080",
"rateLimit": {
"public": {
"limitApiKey": "120",
"limitFrontend": "500",
"windowMs": "60000"
}
},
"encryption": {
"proxy": "352f7c24819086bf3df5a38c1a40586045f73e0007440c9d27d59ee8560e3fe7"
}
},
"eventStreamService": {
"servers": "localhost:4222,localhost:4223,localhost:4224",
"websockets": "false",
"streamName": "CHEFS",
"source": "chefs-local",
"domain": "forms",
"username": "chefs",
"password": "password",
"maxAge": "300000",
"maxBytes": "1048576",
"maxMsgs": "10",
"maxMsgSize": "51200",
"duplicateWindow": "60000",
"numReplicas": "3"
},
"serviceClient": {
"commonServices": {
"ches": {
"endpoint": "https://ches-dev.api.gov.bc.ca/api",
"tokenEndpoint": "https://dev.loginproxy.gov.bc.ca/auth/realms/comsvcauth/protocol/openid-connect/token",
"clientId": "CHES_CLIENT_ID",
"clientSecret": "CHES_CLIENT_SECRET"
},
"cdogs": {
"endpoint": "https://cdogs-dev.api.gov.bc.ca/api",
"tokenEndpoint": "https://dev.loginproxy.gov.bc.ca/auth/realms/comsvcauth/protocol/openid-connect/token",
"clientId": "CDOGS_CLIENT_ID",
"clientSecret": "CDOGS_CLIENT_SECRET"
}
}
},
"customBcAddressFormioComponent": {
"apikey": "xxxxxxxxxxxxxxx",
"bcAddressURL": "https://geocoder.api.gov.bc.ca/addresses.json",
"queryParameters": {
"echo": false,
"brief": true,
"minScore": 55,
"onlyCivic": true,
"maxResults": 15,
"autocomplete": true,
"matchAccuracy": 100,
"matchPrecision": "occupant, unit, site, civic_number, intersection, block, street, locality, province",
"precisionPoints": 100
}
}
}
3 changes: 1 addition & 2 deletions .devcontainer/post-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ npm run build:formio
npm run deploy:formio

# copy over the sample files to the image...
cp -u ${CHEFS_LOCAL_DIR}/local.json.sample ${CHEFS_LOCAL_DIR}/local.json
cp -u ${CHEFS_LOCAL_DIR}/local.sample.json ${CHEFS_LOCAL_DIR}/local.json

# fire up postgres... we want to seed the db
docker compose -f ${CHEFS_LOCAL_DIR}/docker-compose.yml up --wait
Expand All @@ -37,4 +37,3 @@ npm run migrate

# take down postgres, do not need them running all the time.
docker compose -f ${CHEFS_LOCAL_DIR}/docker-compose.yml down

4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,7 @@ yarn-error.log*
!.vscode/README.md

# devcontainer files
!.devcontainer/chefs_local/*.sample
.devcontainer/chefs_local/local.json
.devcontainer/chefs_local/realm-export.json
!.devcontainer/chefs_local/local.sample.json

# temp office files
~$*
Expand Down

0 comments on commit a0285a6

Please sign in to comment.