Demonstration application for a multi service architecture.
The architecture used for this project has the purpose do give an idea how to build scalable and easy to maintain applications. However, given only the task of uploading files using a web frontend, the recommended architecture would of course be an monolithic one (see Microservice MicroservicePrerequisites).

There are three services implemented. A single backend service providing an REST API (media), a frontend service (ui) providing the web based frontend and an API-Gateway and a discovery service (discovery) based on eureka.
The media service does nothing but accepting and providing media files via a REST API. It stores the binaries on the hard drive and metadata in a database (MongoDB).
The UI service provides the web frontend. Additionally it handles all authentication and user requests. All user data is stored in a database (MongoDB).
The UI server also provides the API-Gateway (using zuul) to avoid CORS problems and simplify client-server communication. Endpoints defined in the gateway are discovered using an eureka client.
This is basically a wrapper to only start and run an eureka server using spring boot.
The easiest should be to run the entire application using docker-compose.
you can either build every project separately using mvn clean install -B in every service
directory of run ./build.sh in the root folder.
Once every service is build, simply run:
docker-compose up
It will build all missing images and run containers using the properties defined in the file docker-compose.yml
To manually run a service use:
mvn spring-boot run
or if it is already build:
java -jar SERVICE/target/servive.jar
All neccessary configurations are defined in each application.yml in the projects resource directory. However, when using docker-compose you can overwrite any property using the environment property. Properties defined in the application.yml can be overwritten using the following schema:
#application.yml
config:
init:
user:
name: 'admin@localhost'
# docer-compose.yml
services:
service:
[...]
environment:
- CONFIG_INIT_USER_NAME=admin@localhost
Once the application is started, visit (replace localhost with correct hostname):
UI
http://localhost:8080
EUREKA
http://localhost:8761
MEDIA
http://localhost:8081