From f2febe7777a51876db4fa11988030b2955a05124 Mon Sep 17 00:00:00 2001 From: ctmbl Date: Thu, 20 Apr 2023 10:57:51 +0200 Subject: [PATCH 1/5] Fix non persistent DB by mounting the right volume in the container --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index d7a5c00..c920305 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -10,7 +10,7 @@ services: ports: - $DB_PORT:$DB_PORT volumes: - - "./mongodb:/data/db" + - './mongodb/prod:/bitnami/mongodb' node-app: depends_on: From 1946db7381f3d03b7bdcabf0d0435b5c0569d267 Mon Sep 17 00:00:00 2001 From: ctmbl Date: Thu, 20 Apr 2023 10:58:33 +0200 Subject: [PATCH 2/5] Configure MongoDB port through additional flags to pass to mongod in conatiner --- docker-compose.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index c920305..838584f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -7,6 +7,8 @@ services: - database restart: always env_file: ./.env.production + environment: + - "MONGODB_EXTRA_FLAGS=--port=$DB_PORT" ports: - $DB_PORT:$DB_PORT volumes: From d605d611b4dee77e27bdd5e9f181d3dbd2e3abf5 Mon Sep 17 00:00:00 2001 From: ctmbl Date: Thu, 20 Apr 2023 18:11:42 +0200 Subject: [PATCH 3/5] Run prettier --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 838584f..8b262e5 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -12,7 +12,7 @@ services: ports: - $DB_PORT:$DB_PORT volumes: - - './mongodb/prod:/bitnami/mongodb' + - "./mongodb/prod:/bitnami/mongodb" node-app: depends_on: From 8cd22fefa214faa3aa63856bddff2ccf15b736d9 Mon Sep 17 00:00:00 2001 From: ctmbl Date: Mon, 24 Apr 2023 16:25:01 +0200 Subject: [PATCH 4/5] Add mongodb folder to gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 9b0ff42..7452462 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ certbot node_modules package-lock.json team.txt +mongodb/** From b61bd318e012f0230764818b76f84a3639520746 Mon Sep 17 00:00:00 2001 From: ctmbl Date: Thu, 4 May 2023 16:02:56 +0200 Subject: [PATCH 5/5] Set bitnami/mongodb version tag to latest pros and cons have been discussed here: https://github.com/iScsc/iscsc.fr/pull/95#issuecomment-1534822795 --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 8b262e5..3bd2926 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,7 +2,7 @@ version: "3.8" services: mongodb: - image: docker.io/bitnami/mongodb:4.4 + image: docker.io/bitnami/mongodb:latest networks: - database restart: always