Bootstrap a mu.semte.ch microservices environment in three easy steps.
[INFO] This project was created by running
mu project new awesome-project-name
. If read on GitHub under mu-semtech/mu-project then it is the template repository for a new project, usemu project new
instead.
Setting up your environment is done in three easy steps:
- First configure the running microservices and their names in
docker-compose.yml
- Then, configure how requests are dispatched in
config/dispatcher.ex
- Lastly, simply start the docker-compose.
Alter the docker-compose.yml
file so it contains all microservices you need. The example content should be clear, but you can find more information in the Docker Compose documentation. Don't remove the identifier
and db
container, they are respectively the entry-point and the database of your application. Don't forget to link the necessary microservices to the dispatcher and the database to the microservices.
Next, alter the file config/dispatcher/dispatcher.ex
based on the example that is there by default. Dispatch requests to the necessary microservices based on the names you used for the microservice.
Boot your microservices-enabled system using docker-compose.
cd /path/to/mu-project
docker-compose up
You can shut down using docker-compose stop
and remove everything using docker-compose rm
.