- Backend: Ktor
- Datatabase: PostgreSQL
- Frontend:
- Java 17
- Yarn 2
- Node
- Angular CLI
- Clone Repo
- Settings are applied per default though
/infrastructure/src/jvmMain/resources/application.conf
, these include Database and OAuth configuration. A example is provided in/infrastructure/src/jvmMain/resources/application-env.conf
, which is used for building the application - If you want to contribute to the project run
./gradlew addKtlintCheckGitPreCommitHook
beforehand - execute
yarn install
in/web/src/angular
to install frontend packages
- run
./gradlew runShadow
to start backend - run
yarn start
in/web/src/angular
to start frontend
- When running ktor in Dev Mode, it will attempt to seed a dev user. See Console output for more information.
- Frontend runs on port 4200, backend on port 8000. Frontend requests are getting proxied by angular to port 8000, configure in
/web/src/angular/proxy.conf.json
- Frontend hot reloads, backends needs to get restarted.
- You can execute
./gradlew ktlintCheck
and./gradlew ktlintFormat
to check for backend formatting (alternatively ctrl + ctrl in intellij ot execute gradle commands)
The application is built using Jenkins and Docker. Traefik is used as reverse proxy to serve the application.
For the build of the application several tools are used. The Application is built through using Jenkins and Docker. The Frontend is built using a multi-layered Dockerfile in /web/Dockerfile
The Backend is built through a ktor Plugin, which produces a Dockerfile.
The Jenkinsfile is configured in a way that it is able to distribute builds to two different environments. A Staging and Test environment.
The dev-Branch is deployed to Test, while master-Branch is deployed to Staging.
Some steps inside the build process are only done when those branches are built.
During build, some configuration has to be done inside Jenkins to make builds and Deployment work. They are divided into several parts:
Environment
STAGING_URL
orTEST_URL
: The respective URL (including protocol) to your projectREPLACE_ECR_FRONTEND
: Name of the frontend BuildREPLACE_ECR_BACKEND
: Name of the backend BuildIMAGE_TAG
: The Tag that gets used on your image. This is set directly in the build based on the branch you are onDOCKER_ENV
: The docker environment for Production is set to eitherssh://staging.local
orssh://test.local
since deployment is done through a ssh tunnel
Database
STAGING_DATABASE_URL
orTEST_DATABASE_URL
: Connection url for the respective database in the formatjdbc:postgresql://<name>:<port>/<database>
STAGING_CREDENTIALS
orTEST_CREDENTIALS
: Database credentials stored in Jenkins' credential store
Oauth
STAGING_OAUTH_AUTHORIZE
orTEST_OAUTH_AUTHORIZE
: The Authorize-Url used for the respective Oauth configurationSTAGING_OAUTH_ACCESSTOKEN
orTEST_OAUTH_ACCESSTOKEN
: The Accesstoken-Url used for the respective Oauth configurationSTAGING_OAUTH_CLIENTID
orTEST_OAUTH_CLIENTID
: The Clientid for the respective Oauth configurationSTAGING_OAUTH_SECRET
orTEST_OAUTH_SECRET
: The Client Secret for the respective Oauth configuration