chore: make docker setup compatible with regular mongodb data
All checks were successful
Build / build (pull_request) Successful in 1m51s

We still need to address the database as 'mongodb' instead of '127.0.0.1' inside of the container, but otherwise the MongoDB data folder can simply be copied over. Existing setups shouldn't be affected by this change.
This commit is contained in:
Sainan 2025-10-27 11:51:37 +01:00
parent 3a72617a0f
commit 6d41680e92
2 changed files with 1 additions and 4 deletions

View File

@ -19,9 +19,6 @@ services:
- mongodb
mongodb:
image: docker.io/library/mongo:8.0.0-noble
environment:
MONGO_INITDB_ROOT_USERNAME: openwfagent
MONGO_INITDB_ROOT_PASSWORD: spaceninjaserver
volumes:
- ./docker-data/database:/data/db
command: mongod --quiet --logpath /dev/null

View File

@ -2,7 +2,7 @@
set -e
if [ ! -f conf/config.json ]; then
jq --arg value "mongodb://openwfagent:spaceninjaserver@mongodb:27017/" '.mongodbUrl = $value' /app/config-vanilla.json > /app/conf/config.json
jq --arg value "mongodb://mongodb:27017/openWF" '.mongodbUrl = $value' /app/config-vanilla.json > /app/conf/config.json
fi
exec npm run raw -- --configPath conf/config.json