Skip to content

Commit

Permalink
fix(back) fix mongodb Dockerfile (#454)
Browse files Browse the repository at this point in the history
  • Loading branch information
aguszorza authored May 14, 2024
1 parent 9327465 commit bbfec69
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
5 changes: 4 additions & 1 deletion deploy/db/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
RUN chmod +x /docker-entrypoint-initdb.d/init.sh

ENTRYPOINT ["sh", "/scripts/entrypoint.sh", "mongo-db"]
12 changes: 12 additions & 0 deletions deploy/db/README.md
Original file line number Diff line number Diff line change
@@ -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 <tag_name> .
```

**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.

0 comments on commit bbfec69

Please sign in to comment.