- Java 17
- Docker
You can use SDKMAN! to install Java 17 using this command:
curl -s https://get.sdkman.io | bash
sdk install java
Follow instructions on this page.
Follow instructions on this page.
If you want to run the app with keycloak, proxy and db you can do it with:
$ docker-compose -p help-ua build
$ REINIT_KEYCLOAK=1 docker-compose -p help-ua up -d
REINIT_KEYCLOAK forces the keycloak to reinit the DB to initial state (all changes WILL GET LOST)._ After reiniting keycloak you can restart the containers without REINIT_KEYCLOAK flag:
$ docker-compose -p help-ua stop
$ docker-compose -p help-ua up -d
TODO: it would be good to add to nginx the FrontEnd code somehow? For now you can modify the docker-compose to have volume bind to the web dist folder..
Execute ./start_server.sh
to run the server with running database, pgAdmin and Swagger documentation.
This command will setup:
- API running on http://localhost:8080
- Swagger documentation running on http://localhost:8080/swagger-ui.html
- pgAdmin running on http://localhost:8081 (user:
[email protected]
, pass:admin
) - PostgreSQL 14.2-alpine running on
http://localhost:5432
(orhttp://ads-postgres:5432
internally on docker network)
NOTE: if you face some problems during server startup (and the server is not up in result), it may be related to some changes in SQL DDL scripts.
To fix this, run ./cleanup_docker.sh
script, and then ./start_server.sh
again. This will remove Docker database containers (so all data in DB will be erased).
Execute ./start_db.sh
to run only database with pgAdmin (without the server and Swagger).
You can use PostMan to get token and query the API. You should use in PostMan the following oauth2 token configuration:
Authorization type: oauth2 Header prefix: Bearer Token name: token Callback URL: https://local.pomagamukrainie.gov.pl/ogloszenia/test Auth URL: https://local.pomagamukrainie.gov.pl/auth/realms/POMOCUA/protocol/openid-connect/auth Access Token URL: https://local.pomagamukrainie.gov.pl/auth/realms/POMOCUA/protocol/openid-connect/token ClientId: ogloszenia-fe ClientSecret: Scope: openid profile State: 123
You can use the following sample user to login: login: znxtfetqfiqsds6wqzbdl6pb4eslbyxx password: test
UI with API documentation will be available under /swagger-ui.html
path. OpenAPI (v3) specification will be available under /v3/api-docs
path.