diff --git a/.devcontainer/README.md b/.devcontainer/README.md index a8e34b33f..fc50bfc97 100644 --- a/.devcontainer/README.md +++ b/.devcontainer/README.md @@ -57,10 +57,14 @@ When the devcontainer is built, it copies `.devcontainer/chefs_local/local.json. *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` +- `Postgres DB`: localhost:5432 - `Keycloak Admin console`: http://localhost:8082 - username/password = admin/admin - `CHEFS Frontend`: http://localhost:5173/app - `CHEFS API`: http://localhost:5173/app/api/v1 +## Formio Components +If you are developing the formio components, you should build and redeploy them before running your local debug instances of CHEFS. Use tasks `Components build` and `Components Deploy`. + ## Troubleshooting All development machines are unique and here we will document problems that have been encountered and how to fix them. diff --git a/.vscode/README.md b/.vscode/README.md index 4fa322833..c44fa3c95 100644 --- a/.vscode/README.md +++ b/.vscode/README.md @@ -17,6 +17,10 @@ Tasks can be run from the `Terminal` > `Run Task...` menu item. The `tasks.json` - `All - Reinstall`: reinstall the packages for both the API and the Frontend - `Unit Tests - API`: run the unit tests for the API - `Unit Tests - Frontend`: run the unit tests for the Frontend +- `Components Build`: build the formio components +- `Components Deploy`: deploy the formio components. Build and deploy before serving the frontend will save lots of time. +- `chefs_local up`: when inside the devcontainer, will bring up keycloak and postgresql for local CHEFS deployment. +- `chefs_local down`: when inside the devcontainer, will tear down running keycloak and postgresql for local CHEFS deployment. Tip: You can run the builtin `All Tests` task to run both of the unit tests at the same time. This is possible since they're both configured to be in the `test` group. diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 8dffd0e9f..85aa0490c 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -39,6 +39,26 @@ }, "type": "shell" }, + { + "args": ["run", "build:formio"], + "command": "npm", + "group": "test", + "label": "Components build", + "options": { + "cwd": "${workspaceFolder}/app/frontend" + }, + "type": "shell" + }, + { + "args": ["run", "deploy:formio"], + "command": "npm", + "group": "test", + "label": "Components deploy", + "options": { + "cwd": "${workspaceFolder}/app/frontend" + }, + "type": "shell" + }, { "label": "chefs_local up", "type": "shell",