List of required tools:
- PostgreSQL 13
- Gradle v6.6.1 or gradlew
- Java 8
Use gradle inside root folder for app build.
gradlew buildJIB plugin was added to the project, so you can push docker image to the docker regisrty:
gradlew build jibFor this command the following properties are required:
gradle.properties:
dockerRegistry = <docker-registry-url>
dockerUsername = <docker-username>
dockerPassword = <docker-password>or via environment variables:
ORG_GRADLE_PROJECT_dockerRegistry=<docker-registry-url>
ORG_GRADLE_PROJECT_dockerUsername=<docker-username>
ORG_GRADLE_PROJECT_dockerPassword=<docker-password> PostgreSQL database should be installed and deployed.
Database connection should be configured inside application.yaml:
spring:
datasource:
url: <connection url>
driverClassName: org.postgresql.Driver
username: <database user name>
password: <database password>You can also override the default configuration via environment variables:
DATASOURCE_URL=<connection url>
DATASOURCE_USERNAME=<database user name>
DATASOURCE_PASSWORD=<database password>By default deployable JAR file can be found in
build/libsSimple deploy can be done by java jar command.
java -jar dev-school-app-1.0-SNAPSHOT.jarUseful links
Swagger API: http://localhost:8080/swagger-ui.html
Swagger DOCS: https://swagger.io/docs/