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

lealceldeiro/org.wcdevs.blog.core

Repository files navigation

org.wcdevs.blog.core

License: Apache Java Style Checker Build and Publish codecov Core Application Deployment

Holds org.wcdevs.blog:core, the core application (API) where all the back-end web-services live in.

Contributing

Before start contributing to this project be sure you're familiar with our Contribution guidelines and our Code of Conduct.

Project structure

  • Root (parent) module: org.wcdevs.blog:core
  • Submodules:
    • org.wcdevs.blog:common: contains the common resources across the core application.
    • org.wcdevs.blog:persistence: contains all resources holding the logic to communicate with the persistence layer.
    • org.wcdevs.blog:rest: contains the exposed webservices.

Local development

Requirements

Debugging the application

  • Run docker-compose up -d wcdevs_db keycloak to start the database and the keycloak server
  • Run the Spring Boot application using your favorite IDE (use the local profile)

Running the whole stack with docker compose

  • Run ./mvnw clean package
  • Run docker-compose up -d wcdevs_db keycloak.rt wcdevs_app (if the application is rebuilt, use docker-compose up -d --build wcdevs_db keycloak.rt wcdevs_app instead to pick up the new jar and build a new image)

It can be stopped then using docker-compose down.

For more info about docker compose run docker-compose --help.

Health check

To check the application is running you can hit this endpoint, which should return {"status": "UP"}: <base_url>/manage/health

Example request:

GET /manage/health HTTP/1.1
Host: localhost:82

Example response:

{
  "status": "UP"
}

API Docs

The API documentation can be seen once the app is up and running by navigating to <base_url>/docs/index.html. Example:

http://localhost/docs/index.html

Keycloak

To access the keycloak admin console navigate to http://localhost:8888 and login using as a username and password keycloak.

For more info see the keycloak docs