chore: make docker setup compatible with regular mongodb data (#2944)
Some checks failed
Build / build (push) Successful in 1m51s
Build Docker image / docker (push) Has been cancelled

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.

Reviewed-on: #2944
Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com>
Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
This commit is contained in:
Sainan 2025-10-28 00:50:01 -07:00 committed by Sainan
parent c3bf0ae7c7
commit bb1d6a98c5
2 changed files with 1 additions and 4 deletions

View File

@ -18,9 +18,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