Created
February 17, 2020 14:49
-
-
Save gabrielsaints/5be7e337b978f6f2efe1bde19d1713b5 to your computer and use it in GitHub Desktop.
Create a mongodb container with initial data using file named by import.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3" | |
services: | |
db_mongodb: | |
image: mongo | |
container_name: ze-delivery | |
ports: | |
- "27017:${MONGO_PORT}" | |
volumes: | |
- ./__data__:/data/db | |
import: | |
image: bwnyasse/docker-mongodb-worker | |
container_name: ze-delivery-import | |
command: "/start.sh -i" | |
environment: | |
- MONGO_HOST=db_mongodb | |
- MONGO_PORT=${MONGO_PORT} | |
- MONGO_DB_NAME=${MONGO_DB_NAME} | |
- MONGO_COLLECTION_NAME=pdvs | |
depends_on: | |
- db_mongodb | |
volumes: | |
- $PWD:/tmp/mongodb/:rw |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment