Skip to content

Conversation

@bdemetris
Copy link

@bdemetris bdemetris commented Oct 20, 2022

#12

Adding MongoDB Support to nanodep

How to test this PR

create a local mongodb using the docker-compose file located in this PR storage/mongodb/docker-compose.yml

export MONGO_ROOT_USER=root
export MONGO_ROOT_PASSWORD=root

docker-compose -f path/to/compose.yml up -d

make release

./depserver-darwin-amd64 -api supersecret -storage=mongodb -storage-dsn=mongodb://root:[email protected]:27017

follow the quickstart guide for setting up env vars and then just walk through it...

./tools/cfg-get-cert.sh > $DEP_NAME.pem

./tools/cfg-decrypt-tokens.sh /path/to/depname_Token_2022-10-19T19-48-43Z_smime.p7m

./tools/cfg-set-assigner.sh 6E19C113DD0D67948306CB70F7FA0338

alternatively, the testing suite handles cleaning and testing writes to the database so you could just do

export NANODEP_MONGODB_STORAGE_TEST=true
go test -v ./...

@bdemetris bdemetris marked this pull request as ready for review October 20, 2022 19:33
@jessepeterson jessepeterson mentioned this pull request Oct 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant