diff --git a/deploy/db/Dockerfile b/deploy/db/Dockerfile index e966ab46d..4ae151402 100644 --- a/deploy/db/Dockerfile +++ b/deploy/db/Dockerfile @@ -2,5 +2,8 @@ FROM mongo:6.0.9 COPY docker/init.sh /docker-entrypoint-initdb.d/init.sh COPY db/createdb.js /home/createdb.js +COPY docker/entrypoint.sh /scripts/entrypoint.sh -RUN chmod +x /docker-entrypoint-initdb.d/init.sh \ No newline at end of file +RUN chmod +x /docker-entrypoint-initdb.d/init.sh + +ENTRYPOINT ["sh", "/scripts/entrypoint.sh", "mongo-db"] \ No newline at end of file diff --git a/deploy/db/README.md b/deploy/db/README.md new file mode 100644 index 000000000..469b74bc7 --- /dev/null +++ b/deploy/db/README.md @@ -0,0 +1,12 @@ +# MongoDB as a replicaSet + +The scripts defined here are used to start a MongoDB instance configured as a replicaSet. The Dockerfile defines the docker image of a mongo replicaSet that will be used in Kubernetes (necessary for the Kubernetes version of BACK). + +To build the docker image we need to run the `docker build` command at the `deploy` directory. + +``` +# In the deploy directory, build the Docker image +docker build -f db/Dockerfile -t . +``` + +**WARNING:** do not build the image using a machine with ARM architecture (for example all Macs with chip M*) as it will not work in our cluster. \ No newline at end of file