docker operations
This commit is contained in:
parent
f408381266
commit
7bfd73f505
7
.gitignore
vendored
7
.gitignore
vendored
@ -1,3 +1,6 @@
|
|||||||
./archivar
|
./serra
|
||||||
inventory/
|
_db/*
|
||||||
|
!_db/.placeholder
|
||||||
|
_backup/*
|
||||||
|
!_backup/.placeholder
|
||||||
dist/
|
dist/
|
||||||
|
|||||||
0
_backup/.placeholder
Normal file
0
_backup/.placeholder
Normal file
0
_db/.placeholder
Normal file
0
_db/.placeholder
Normal file
@ -10,8 +10,21 @@ services:
|
|||||||
MONGO_INITDB_ROOT_USERNAME: root
|
MONGO_INITDB_ROOT_USERNAME: root
|
||||||
MONGO_INITDB_ROOT_PASSWORD: root
|
MONGO_INITDB_ROOT_PASSWORD: root
|
||||||
volumes:
|
volumes:
|
||||||
- mongodb:/data/db
|
- 'mongodb:/data/db'
|
||||||
|
- 'mongodbbackup:/backup'
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
mongodb:
|
mongodb:
|
||||||
|
driver: local
|
||||||
|
driver_opts:
|
||||||
|
type: none
|
||||||
|
device: "$PWD/_db"
|
||||||
|
o: bind
|
||||||
|
|
||||||
|
mongodbbackup:
|
||||||
|
driver: local
|
||||||
|
driver_opts:
|
||||||
|
type: none
|
||||||
|
device: "$PWD/_backup"
|
||||||
|
o: bind
|
||||||
|
|
||||||
|
|||||||
11
readme.md
11
readme.md
@ -9,7 +9,6 @@
|
|||||||
|
|
||||||
mvp
|
mvp
|
||||||
|
|
||||||
* refactor storage to have a storage object.
|
|
||||||
* single view for card, with history
|
* single view for card, with history
|
||||||
* docker with local mounted volume and git ignore
|
* docker with local mounted volume and git ignore
|
||||||
* mongodb backup container
|
* mongodb backup container
|
||||||
@ -29,3 +28,13 @@ optional
|
|||||||
Find cards that increased prices
|
Find cards that increased prices
|
||||||
|
|
||||||
db.cards.find({$expr: {$gt: [{$arrayElemAt: ["$serra_prices", -2]}, {$arrayElemAt: ["$serra_prices", -1]}]}}, {name:1})
|
db.cards.find({$expr: {$gt: [{$arrayElemAt: ["$serra_prices", -2]}, {$arrayElemAt: ["$serra_prices", -1]}]}}, {name:1})
|
||||||
|
|
||||||
|
# MongoDB Operations
|
||||||
|
|
||||||
|
Do a database dump
|
||||||
|
|
||||||
|
mongodump -u root -p root --authenticationDatabase admin -d serra -o /backup/
|
||||||
|
|
||||||
|
Do a collection export to json
|
||||||
|
|
||||||
|
mongoexport -u root -p root --authenticationDatabase admin -d serra -c cards
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user