Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Docker compose Spring Boot MongoDB
#version: "3.7"
#services:
# api_service:
# build: .
# restart: always
# ports:
# - 8080:8080
# links:
# - mongo_db:app_db
# mongo_db:
# image: "mongo:4.4.3"
# restart: always
# ports:
# - 27017:27017
version: "3.7"
services:
api_service:
build: .
restart: always
ports:
- 8080:8080
depends_on:
- mongo_db
mongo_db:
image: "mongo:4.4.3"
restart: always
ports:
- 27017:27017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment