-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add mongodb implementation for the db package
The db interface has now an implementation for mongodb. So instead of pebble a user or consumer of the vocdoni-node API can choose to use mongodb. Its not faster than local KV, but useful when the host runing the database has no persistent storage available, so a remote storage is required. The mongodb url must be set on a env var, such as: MONGODB_URL="mongodb://root:vocdoni@localhost:27017/" go run ./cmd/node -t mongodb -c dev Signed-off-by: p4u <[email protected]>
- Loading branch information
Showing
15 changed files
with
406 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
version: '3.1' | ||
|
||
services: | ||
|
||
mongo: | ||
image: 'bitnami/mongodb:latest' | ||
restart: ${RESTART:-no} | ||
ports: | ||
- 27017:27017 | ||
environment: | ||
- MONGODB_USERNAME=root | ||
- MONGODB_PASSWORD=vocdoni | ||
- MONGODB_DATABASE=vocdoni | ||
- MONGODB_ROOT_PASSWORD=vocdoni | ||
volumes: | ||
- mongodb:/bitnami/mongodb | ||
|
||
# MONGODB_URL=mongodb://root:vocdoni@mongo:27017/ | ||
# MONGODB_URL=mongodb://root:[email protected]:27017/ | ||
|
||
volumes: | ||
mongodb: {} |
Oops, something went wrong.