-
Notifications
You must be signed in to change notification settings - Fork 24
Development
Development is currently supported through the use of Docker containers, and or local development with VS Code and Visual Studio 2019. Although any IDE that supports the languages should work.
Install the following applications.
-
GitBash (recommended to use git bash when running
make
commands). - chocolately.
-
make with command
choco install make
. Tutorial Here for installing make and updating your PATH. - dotnet cli and dotnet 6 sdk
- npm (nvm recommended)
- Homebrew
-
coreutils with command
brew install coreutils
.
-
Create a fork of the repository https:/bcgov/pims.
-
Clone the forked branch you want work on. If using Docker, ensure you are using a local (not network) drive.
git clone https:/[username]/bcgov/pims
-
Generate the
.env
files required to run the solution. You will be prompted for usernames, pick ones of your choosing. After generating the files, you may edit the randomly generated password (it's used in multiple.env
files)../scripts/gen-env-files.sh
-
Configure Docker Desktop
- General > "Use WSL 2 based engine": needs to be unchecked
- Resources > File Sharing: add /path/to/PIMS, click "Apply & Restart"
-
Configure Keycloak. This requires logging into Keycloak and updating your
.env
files with the correct client secret.docker-compose up -d keycloak
Login to the Keycloak Administration Console with your username and password (found in
/auth/keycloak/.env
). It can take a moment for it to connect, it may not load right away.In Keycloak: Configure > Clients > pims-service-account, copy Credentials > Secret and update all your
.env
files with the client secret./backend/api/.env -
Keycloak__ServiceAccount__Secret={client secret}
/tools/keycloak/sync/.env -
Auth__Keycloak__Secret={client secret}
-
Setup your local development container environment. This will require installing
.NET Core CLI
. Follow the below commands for container environment setup.
docker logs psp-keycloak
make start up
In order to show the running containers
docker ps
docker-compose up database
docker-compose up -d database
In order to start the MS SQL Server and to run the scripts .
docker logs psp-db
In order to Seed the database with test data and PSP_PIMS_S23_00 is the targeted sprint.
make db-seed n=PSP_PIMS_S23_00
docker logs psp-db
docker-compose up -d geoserver
Note: Make sure API_URL=http://localhost:5000/ found in /frontend/.env
before running the solution.
-
Once running you can now start using the solution - http://localhost:3000
For git developer workflow instructions, see GitHub Workflow.
To simplify development once the initial setup is complete, you can use the make
commands.
make help