...

/

Putting Everything Together With Docker Compose

Putting Everything Together With Docker Compose

Learn how to run the whole full reactive stack application with Docker Compose.

We'll cover the following...

We’ll build these images and run the whole application via a Docker Compose file that is located in the docker folder in the GitHub repository.

These instructions are for locally running the application with Docker Compose.

Press + to interact
version: "2"
services:
mongo:
image: mongo:3.4
hostname: mongo
ports:
- "27017:27017"
volumes:
- mongodata:/data/db
networks:
- network-reactive
spring-boot-reactive:
build:
context: ../spring-boot-reactive-web
image: spring-boot-reactive-web-tpd
environment:
# Overrides the host in the Spring Boot application to use the Docker's hostname
- SPRING_DATA_MONGODB_HOST=mongo
ports:
- "8080:8080"
networks:
- network-reactive
angular-reactive:
build:
context: ../angular-reactive
image: angular-reactive-tpd
ports:
- "4200:1827"
networks:
- network-reactive
volumes:
mongodata:
networks:
network-reactive:

This file is all we need for Docker to find out how to build the corresponding images and how to run the containers together. Let’s describe its main features: ...