Skip to content

About

MongoDB with multiple databases

Topics

Resources

Stars

1 star

Watchers

3 watching

Forks

Latest commit

 

History

11 Commits

Folders and files

Repository files navigation

MongoDB

Official Docker MongoDB Image of Synapsis

Docker Image content

Dockerfile Example

FROM syis/mongo:4.4.2-bionic

# An initialization script creates the needed
# databases by reading the environments named:
# - MONGO_DB_x_NAME
# - MONGO_DB_x_USER
# - MONGO_DB_x_PASSWORD
# (where x is an incremental integer)
# The script cycle over the numbers (by starting from 1),
# until it NOT find a variable named MONGO_DB_i_NAME

ENV MONGO_DB_1_NAME='db_name'
ENV MONGO_DB_1_USER='db_user'
ENV MONGO_DB_1_PASSWORD='db_password'

ENV MONGO_DB_2_NAME='db_2_name'
ENV MONGO_DB_2_USER='db_2_user'
ENV MONGO_DB_2_PASSWORD='db_2_password'

EXPOSE 27017

Links

Tags

About

MongoDB with multiple databases

Topics

Resources

Stars

1 star

Watchers

3 watching

Forks

Releases

Packages

Contributors

Languages