Skip to content

Instantly share code, notes, and snippets.

@tyagiakhilesh
Created January 17, 2022 08:37
Show Gist options
  • Save tyagiakhilesh/2c76782104fa3f4dd7db5c2102d2ee36 to your computer and use it in GitHub Desktop.
Save tyagiakhilesh/2c76782104fa3f4dd7db5c2102d2ee36 to your computer and use it in GitHub Desktop.
Starup Klov with Mongo in Compose. (In whatever directory you shall launch compose command, it shall laydown db data there itself)
version: '2'
services:
mongo:
image: mongo:latest
container_name: mongo
environment:
- MONGO_INITDB_ROOT_USERNAME=user
- MONGO_INITDB_ROOT_PASSWORD=password
- MONGO_INITDB_DATABASE=klov
ports:
- "57017:27017"
volumes:
- .:/data/db
klov:
image: anshooarora/klov:1.0.1
container_name: klov
environment:
- SPRING_DATA_MONGODB_URI=mongodb://user:password@mongo:27017
ports:
- 6780:80
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment