Skip to content

Instantly share code, notes, and snippets.

@pkosiec
Last active November 5, 2018 11:47
Show Gist options
  • Save pkosiec/382025c340992c20d0912ab7976e611f to your computer and use it in GitHub Desktop.
Save pkosiec/382025c340992c20d0912ab7976e611f to your computer and use it in GitHub Desktop.
Custom Mongo Seeding Docker image example
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