Set it so Docker image uses an empty database by default.

This commit is contained in:
John Washam
2016-12-22 12:20:23 -08:00
parent f9a7a4cdc8
commit 074610cb4f
4 changed files with 3 additions and 2 deletions

1
.gitignore vendored
View File

@@ -2,3 +2,4 @@
py3env/
__pycache__/
config-personal.txt
cards.db

View File

@@ -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.

View File

@@ -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