Set it so Docker image uses an empty database by default.
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -2,3 +2,4 @@
|
||||
py3env/
|
||||
__pycache__/
|
||||
config-personal.txt
|
||||
cards.db
|
||||
|
||||
@@ -82,7 +82,7 @@ __If you already had a backup file `cards.db`. Run following command:__
|
||||
`<path_to_folder_contains_cards_db>`: is the full path contains `cards.db`.
|
||||
Example: `/home/tinpee/cs-flash-cards/db`, and `cards.db` is inside this folder.
|
||||
|
||||
For convenient, if you don't have `cards.db`, this container will auto copy a new one from `cards-jwasham.db`. So you don't need to `initdb`.
|
||||
For convenience, if you don't have `cards.db`, this container will auto copy a new one from `cards-empty.db`.
|
||||
|
||||
### How to backup data ?
|
||||
We just need store `cards.db` file, and don't need any sql command.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ ! -f /src/db/cards.db ]; then
|
||||
cp cards-jwasham.db /src/db/cards.db
|
||||
cp cards-empty.db /src/db/cards.db
|
||||
fi
|
||||
|
||||
export CARDS_SETTINGS=/src/config.txt
|
||||
|
||||
Reference in New Issue
Block a user