Skip to content
This repository has been archived by the owner on Sep 7, 2023. It is now read-only.

tdevopsschool/course-project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

moved to https://gitlab.com/t-systems-devops-school/course-project

Course project of DevOps school

Build backend application

Preconditions

List of required tools:

  • PostgreSQL 13
  • Gradle v6.7.1 or gradlew
  • Java 8

Check the workspace preparation README file on how to install them.

DB instance creation

Before building the application you need to create a DB instance.

⚠️ In CentsOS 7 you need to execute sudo -u postgres -i before continuing.

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

DB connection configuration

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>

Build

Use gradle inside root folder for app build.

cd backend
./gradlew build

Deploy

By default deployable JAR file can be found in

backend/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:

Build frontend application

Preconditions

List of required tools:

  • Node.js v14.15.0
  • Yarn v1.22.11
  • Gradle v6.7.1 or gradlew
  • Java 8

Build

Use gradle inside root folder for app build.

cd frontend
./gradlew jar

Deploy

By default deployable JAR file can be found in

frontend/devschool-front-app-server/build/libs

Simple deploy can be done by java jar command.

java -jar devschool-front-app-server-1.0.0.jar

Possible deploy flags:

-port=<port> port of application deploy
-P:ktor.backend.port=<port> port of backend application
-P:ktor.backend.host=<host> address of backend application     
-P:ktor.backend.schema=<schema> schema of backend application   

Address of the start page is ./dev-ops-school/index.html

Example:

About

Course project of DevOps school

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •