Requirements:
- Java 25
- Docker (running)
- docker-compose or docker compose
Steps to start Salat locally:
- Build the image:
./mvnw spring-boot:build-image - Run docker-compose:
docker-compose up -d(in newer docker versions usedocker compose up -d) - That's it. Salat should now be running. To check, open in browser: http://localhost:8080?login-name=tt
Shutdown:
- Stop docker-compose: CTRL+C
- Stop built containers:
docker-compose stop(in newer docker versions usedocker compose stop) - If you want to remove the containers:
docker-compose down(in newer docker versions usedocker compose down)
Open the URL <http://localhost:8080?login-name=>
You can change the login-name parameter to login as a different user.
It is even possible to append ?login-name=<sign> to any URL, to log in the user.
Valid login-names in the test-dataset are:
- admin: Administrator
- bm: "Bossy Bossmann", Administrator
- tt: "Testy Testmann", Employee
There is no need to logout. But you can just click the button to logout.
With the above login url, you can change the login user at any time without logging out!
To start only the local database, without the Salat application:
docker-compose -f docker-compose-infra.yml up
docker-compose down if you had the application running before.
Should you encounter the error
No bean named 'buildProperties' available
This can be fixed by running
./mvnw spring-boot:build-info
Explanation: Maven creates a file named target/classes/META-INF/build-info.properties.
This file might be missing when an IDE does not create it. (Happened to Klaus with IntelliJ IDEA, despite Maven Integration).
(by Klaus)
Should you encounter the error
No bean named 'gitProperties' available
This can be fixed by running
./mvnw git-commit-id:revision
Explanation: Maven creates a file named target/classes/git.properties.
This file might be missing when an IDE does not create it. (Happened to Klaus with IntelliJ IDEA, despite Maven Integration).
(by Klaus)
Changes to the database are collected via Liquibase in the following file:
src/main/resources/db/changelog/db.changelog-master.yaml
The following environment variables must be set in each environment/stage:
SPRING_DATASOURCE_USERNAME
SPRING_DATASOURCE_PASSWORD
SPRING_DATASOURCE_URL
The following is an example for local testing with the included docker-compose file:
SPRING_DATASOURCE_USERNAME=salattest
SPRING_DATASOURCE_PASSWORD=salattest
SPRING_DATASOURCE_URL=jdbc:mysql://localhost:3306/salat?useUnicode=true&useJDBCCompliantTimezoneShift=true&serverTimezone=Europe/Berlin&useLegacyDatetimeCode=false&autoReconnect=true
More detailed design decisions can be found in AGENTS.md