diff --git a/services/backend/services/v4/config/.dev.env b/services/backend/services/v4/config/.dev.env index c2faf9bd..f269e752 100644 --- a/services/backend/services/v4/config/.dev.env +++ b/services/backend/services/v4/config/.dev.env @@ -1,4 +1,4 @@ -MONGODB_URI=mongodb://mongodb:27017/dev_be_next +MONGODB_URI=mongodb://mongodb:27017/dev-dacat-next ADMIN_GROUPS=admin,adminingestor CREATE_DATASET_GROUPS=group1,group2,group3 CREATE_DATASET_WITH_PID_GROUPS=group2 diff --git a/services/mongodb/README.md b/services/mongodb/README.md index 8a62cc6e..687ab8a9 100644 --- a/services/mongodb/README.md +++ b/services/mongodb/README.md @@ -16,6 +16,8 @@ These files are ingested into the database using mongo funcionalities and bypass In the default configuration [init.sh](./config/init.sh), the seeding creates data in the mongodb database used by the `backend` service (either [v4](../backend/services/v4/), by default, or [v3](../backend/services/v3/) if specified otherwise by setting `BE_VERSION`). +When `DEV=true` and `BE_VERSION=v4` the seeding writes to `dev-dacat-next`. + For an explanation of how setting `BE_VERSION` changes the environment creation see [here](../../README.md#docker-compose-profiles-and-env-variables-configuration-options). ## Dependency on `BE_VERSION` diff --git a/services/mongodb/compose.yaml b/services/mongodb/compose.yaml index 76ed4530..4c2568a4 100644 --- a/services/mongodb/compose.yaml +++ b/services/mongodb/compose.yaml @@ -7,6 +7,7 @@ services: - ./config/seed:/seed environment: BE_VERSION: ${BE_VERSION:-v4} + DEV: ${DEV:+dev-} restart: on-failure volumes: diff --git a/services/mongodb/config/init.sh b/services/mongodb/config/init.sh index 045000ea..83300219 100755 --- a/services/mongodb/config/init.sh +++ b/services/mongodb/config/init.sh @@ -2,7 +2,7 @@ cd /seed || exit -[ "${BE_VERSION}" = "v4" ] && DB="dacat-next" || DB="dacat" +[ "${BE_VERSION}" = "v4" ] && DB="${DEV}dacat-next" || DB="dacat" for FILE_NAME in *.json do