Skip to content

Instantly share code, notes, and snippets.

@ad5jo
Forked from jschwarty/docker-compose.yml
Created March 6, 2020 16:09
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 ad5jo/3d6cedbe9aa8fa2bfa60d053c3a6d235 to your computer and use it in GitHub Desktop.
Save ad5jo/3d6cedbe9aa8fa2bfa60d053c3a6d235 to your computer and use it in GitHub Desktop.
Docker compose for mongodb and seed containers
version: '2'
services:
mongodb:
image: mongo:3.2.6
ports:
- "27017:27017"
mongo-seed:
image: mongo:3.2.6
links:
- mongodb
volumes:
- ./seed-data:/seed-data
command:
'bash -c "mongoimport --host mongodb --type json --file /seed-data/projects.json --jsonArray"'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment