This is the backend of the portal template
- JDK 21
- Docker Desktop
- Portal Frontend: TBD
- Nl Portal docker compose: https://github.com/nl-portal/nl-portal-docker-compose
For the project to run without errors, you need the .env.properties file in your spring application. This does assume you are running the docker compose from the nl-portal-docker-compose repository.
- Build the project in gradle(in case this doesn't happen automatically, press the reload button in your gradle tab and wait for it to finish building)
- You need to have the containers running from the nl-portal-docker-compose
- Start the project with the gradle task
bootRunor from the commandline with:./gradlew bootRun
The database container is started and the corresponding database is made, if it doesn't exist yet, automatically.
You can stop or restart the process via the respective buttons in the UI of your IDE.
The database container is stopped when the bootRun task fails executing (also happens when you stop the program from running in the IDE)
To receive template updates with changes to for example dependency versions, use the following steps:
If you want your forked repository to not be public, you need to use github import instead of using a github fork [GitHub fork does not allow changing the repository visibility] For making an import: Link
First time setup:
git clone https://github.com/Gemeente-x/my-nl-portal-backend.git
cd .\my-nl-portal-backend\
git branch -a
git remote add template https://github.com/nl-portal/nl-portal-backend-template.git
git remote -v
git fetch template
git branch -a
To update:
git fetch template main
git merge template/main
git push
If you want to use a different (snapshot) version of the nl-portal-backend-libraries you can overwrite the dependency version using Gradle properties. For example:
gradle build -PlibraryVersion="9.9.9.SNAPSHOT"
Please refer to the Gradle documentation for other ways of setting properties.
Snapshots of the backend libraries are built as GitHub actions.
To connect to the snapshot repository GRP_USER and GRP_TOKEN need to be set as property or as environment variable for authorisation to the repository. Choose the best option on your automation tooling & way of working.
For local development you can run the following powershell commands:
$env:GRP_USER="myUser"
$env:GRP_TOKEN="myToken"
gradle build -PlibraryVersion="1.0.96-SNAPSHOT"