Skip to content

Commit

Permalink
make sure we ignore editable config files.
Browse files Browse the repository at this point in the history
update readme explain some config, provide login info for KC

Signed-off-by: Jason Sherman <[email protected]>
  • Loading branch information
usingtechnology committed Jan 15, 2024
1 parent dc9f381 commit 7861254
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
11 changes: 8 additions & 3 deletions .devcontainer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Keycloak and Postgresql will be launched using docker compose. These will run in
CHEFS API and Frontend are running as node applications on the devcontainer - again, ports are forwarded to the host.

### Configuring CHEFS locally
When the devcontainer is built, it copies `.devcontainer/chefs_local/local.json.sample` and `.devcontainer/chefs_local/realm-export.json.sample` to `.devcontainer/chefs_local/local.json` and `.devcontainer/chefs_local/realm-export.json` respectively. These copies are not checked in and allow the developer to make changes and tweaks without impacting other developers or accidentially sharing passwords.
When the devcontainer is built, it copies `.devcontainer/chefs_local/local.json.sample` and `.devcontainer/chefs_local/realm-export.json.sample` to `.devcontainer/chefs_local/local.json` and `.devcontainer/chefs_local/realm-export.json` respectively. These copies are not checked in and allow the developer to make changes and tweaks without impacting other developers or accidentially committing passwords.

### Authorization Prerequisites
1. An IDIR account is required to access CHEFS.
Expand All @@ -40,8 +40,6 @@ When the devcontainer is built, it copies `.devcontainer/chefs_local/local.json.
4. Navigate to the CSS page, login with your IDIR, and download the ‘Development’ Installation JSON from your SSO Integration.
5. Back in the `realm-export.json` file, search for all instances of `YYYYYYYYYYYY` and replace it with the `resource` you obtained from the downloaded JSON file. Search for all instances of `ZZZZZZZZZZZZ` and replace it with the `secret`.

Note that `CHEFS Frontend` launch configuration is using the `chefs-frontend-local` client in Keycloak, not `chefs-frontend-local` as we do in production.

### Run/Debug
1. start Keycloak and Postgresql. Many ways to start...
- right click on `.devcontainer/chefs_local/docker-compose.yml` and select `Compose up`
Expand All @@ -56,6 +54,13 @@ Note that `CHEFS Frontend` launch configuration is using the `chefs-frontend-loc
- or use command palette `Docker: Compose Down` then select `.devcontainer/chefs_local/docker-compose.yml`
- or `Terminal | Run Task...|chefs_local down`

*Notes*
- `CHEFS Frontend` launch configuration is using the `chefs-frontend-local` client in Keycloak, not `chefs-frontend` client as we do in production.
- `CHEFS API` will use the configuration found at `.devcontainer/chefs_local/local.json`
- `Keycloak Admin console`: http://localhost:8082 - username/password = admin/admin
- `CHEFS Frontend`: http://localhost:5173/app
- `CHEFS API`: http://localhost:5173/app/api/v1

## Troubleshooting
All development machines are unique and here we will document problems that have been encountered and how to fix them.

Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ yarn-error.log*

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

# temp office files
~$*
Expand Down

0 comments on commit 7861254

Please sign in to comment.