Skip to content

EmailsEmotions/EE_backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EmailsEmotions microservice backend

Important informations

Docker

Make sure to run docker-compose stop or docker-compose down or docker-compose down -v or docker-compose rm to clear your working environment. docker-compose down --remove docker-compose -f databases-docker-compose.yaml down

When something is not working for example database ;)

Important flags & commands:

  • docker-compose -f databases-docker-compose.yaml up --build --remove-orphans
    • --remove-orphans : Removes all containers left by docker-compose
  • docker-compose -f databases-docker-compose.yaml down --v
    • --v or -volumes : Removes all volumes left by containers
  • docker-compose -f docker-compose.yaml up --build users-service -d
    • users-service -d : Rebuilds only one service from compose (and all that will be depending)

Run & Build

Most important is the config-server and order of startup for different applications. Supporting services (Config and Discovery Server) must be started before any other application (Admin, Users, Formality, API, etc).

Main access point is API Gateway on - http://localhost:8080

All services have configured Swagger UI on http://service:port/swagger-ui/index.html

IntelliJ

Import whole project by choosing main .pom. Make sure you cloned [Configuration repository].

git clone https://github.com/EmailsEmotions/EmailsEmotionsConfiguration

Setup path to this repository in config-server/src/main/resources/bootstrap.yml.

searchLocations: file:///ABSOLUTE_PATH_TO_CONFIG_REPOSITORY

Next you have to run databases

docker-compose -f databases-docker-compose.yaml up --build --remove-orphans

optionally ELK stack

docker-compose -f elk-docker-compose.yaml up --build --remove-orphans

Docker

You have to build all .jars with mvn package then you can execute

$ docker-compose -f docker-compose --build -d

Docker BuildKit

To speed up build process when not using jars use Docker BuildKit

https://docs.docker.com/develop/develop-images/build_enhancements/

Stack overflow: Maven docker cache dependencies

Windows

> setx DOCKER_BUILDKIT 1
> setx COMPOSE_DOCKER_CLI_BUILD 1
> docker-compose -f docker-compose-with-maven.yaml up --build -d
> docker-compose -f docker-compose.yaml up --build -d
> docker-compose -f docker-compose.yaml up -f docker-compose-ai.yaml --build -d

Linux

$ export DOCKER_BUILDKIT=1 # or configure in daemon.json
$ export COMPOSE_DOCKER_CLI_BUILD=1
$ docker-compose -f docker-compose-with-maven.yaml up --build -d
$ docker-compose -f docker-compose.yaml up --build -d
$ docker-compose -f docker-compose.yaml up -f docker-compose-ai.yaml --build -d

Git Flow Setup

git flow init [Enter]x5

More informations here https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow

AI-module

To use AI module you have to clone https://github.com/EmailsEmotions/EE_AI.git

And build image with tag ai-docker

docker build -t ai-docker .

Additional informations

Components Resources
Config Server Setup Config server properties and [Configuration repository]
Service Discovery Eureka server and Service discovery client
API Gateway Spring Cloud Gateway starter and Routing configuration
Docker Compose Spring Boot with Docker guide and docker-compose file
ELK stack ELK stack and ELK docker-compose
Databases stack DB docker-compose
Jmeter JMeter startup
Creating microservice Docs on creating microservice
Swagger Config Docs on adding Swagger to service
[Configuration repository]: https://github.com/EmailsEmotions/EmailsEmotionsConfiguration

About

Emails Emotion backend

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published