Skip to content

Commit

Permalink
Set it so Docker image uses an empty database by default.
Browse files Browse the repository at this point in the history
  • Loading branch information
jwasham committed Dec 22, 2016
1 parent f9a7a4c commit 074610c
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
py3env/
__pycache__/
config-personal.txt
cards.db
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 074610c

Please sign in to comment.