Skip to content

Instantly share code, notes, and snippets.

@javatodev
Created January 17, 2021 15:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save javatodev/e389b3c1bb97f972bcac88a66978430f to your computer and use it in GitHub Desktop.
Save javatodev/e389b3c1bb97f972bcac88a66978430f to your computer and use it in GitHub Desktop.
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