moved to https://gitlab.com/t-systems-devops-school/dev-school-app
List of required tools:
- PostgreSQL 13
- Gradle or gradlew
- Java 8
Check workspace preparation README to install it
Before to build applciation you need create a DB instance
sudo -u postgres -i
before continue
psql postgres
CREATE ROLE postgres WITH LOGIN PASSWORD 'postgres';
If user postgres exists - execute ALTER USER postgres WITH PASSWORD 'postgres';
ALTER ROLE postgres CREATEDB;
\du # To check users
\q # Exit
psql postgres -U postgres
CREATE DATABASE devschool;
\l # To check created DB instance
\q # Exit
Source - https://www.codementor.io/@engineerapart/getting-started-with-postgresql-on-mac-osx-are8jcopb
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>
Use gradle inside root folder for app build.
gradlew build
By default deployable JAR file can be found in
\dev-school-app\build\libs
Simple deploy can be done by java jar command.
java -jar dev-school-app-1.0-SNAPSHOT.jar
Or to start the app in background
java -jar dev-school-app-1.0-SNAPSHOT.jar &
Useful links
Swagger API: https://localhost:8080/swagger-ui.html
Swagger DOCS: https://swagger.io/docs/