Last active
November 5, 2018 11:47
-
-
Save pkosiec/382025c340992c20d0912ab7976e611f to your computer and use it in GitHub Desktop.
Custom Mongo Seeding Docker image example
This file contains 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
FROM pkosiec/mongo-seeding:3.0.0 | |
WORKDIR /mydb/ | |
# Copy your project (import data and all dependencies have to be there) | |
COPY ./mydb /mydb/ | |
# Install external dependencies | |
RUN npm install | |
# Set environmental variables | |
ENV DB_NAME mydbname | |
ENV DB_PORT 30000 | |
ENV DROP_DATABASE true | |
ENV REPLACE_ID true | |
# Set default workdir to simplify running the image | |
WORKDIR /mydb/data-import |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment