...
/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.4hostname: mongoports:- "27017:27017"volumes:- mongodata:/data/dbnetworks:- network-reactivespring-boot-reactive:build:context: ../spring-boot-reactive-webimage: spring-boot-reactive-web-tpdenvironment:# Overrides the host in the Spring Boot application to use the Docker's hostname- SPRING_DATA_MONGODB_HOST=mongoports:- "8080:8080"networks:- network-reactiveangular-reactive:build:context: ../angular-reactiveimage: angular-reactive-tpdports:- "4200:1827"networks:- network-reactivevolumes: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: ...