forked from jwasham/computer-science-flash-cards
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request jwasham#7 from tinpee/master
Docker backup and restore data
- Loading branch information
Showing
4 changed files
with
28 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,12 +3,13 @@ MAINTAINER Tinpee <[email protected]> | |
|
||
ADD . /src | ||
WORKDIR /src | ||
RUN pip install flask gunicorn \ | ||
&& cp cards-jwasham.db cards.db | ||
RUN pip install flask gunicorn | ||
|
||
COPY entrypoint.sh / | ||
RUN chmod +x /entrypoint.sh | ||
|
||
VOLUME /src/db | ||
|
||
EXPOSE 8000 | ||
CMD ["/entrypoint.sh"] | ||
|
||
|
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 |
---|---|---|
@@ -1,4 +1,9 @@ | ||
#!/bin/bash | ||
|
||
if [ ! -f /src/db/cards.db ]; then | ||
mkdir -p /src/db | ||
cp cards-jwasham.db /src/db/cards.db | ||
fi | ||
|
||
export CARDS_SETTINGS=/src/config.txt | ||
gunicorn --bind 0.0.0.0:8000 flash_cards:app |
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