Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Seed DEV v4 DB #381

Merged
merged 1 commit into from
Nov 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion services/backend/services/v4/config/.dev.env
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 2 additions & 0 deletions services/mongodb/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
1 change: 1 addition & 0 deletions services/mongodb/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ services:
- ./config/seed:/seed
environment:
BE_VERSION: ${BE_VERSION:-v4}
DEV: ${DEV:+dev-}
restart: on-failure

volumes:
Expand Down
2 changes: 1 addition & 1 deletion services/mongodb/config/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down