Skip to content

Commit

Permalink
add docker file
Browse files Browse the repository at this point in the history
  • Loading branch information
tinpee committed Oct 17, 2016
1 parent e299ca9 commit d456b86
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
11 changes: 11 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM python
MAINTAINER Tinpee <[email protected]>

ADD . /src
WORKDIR /src
RUN pip install flask gunicorn \
&& cp cards-jwasham.db cards.db

CMD ["gunicorn", "--bind", " 0.0.0.0:8000", "flash_cards:app"]


9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,11 @@ It uses:
1. When you're ready to start memorizing, click either "General" or "Code"
in the top menu.
*Happy learning!*
## How to run with Docker
__Make sure you already installed [docker](https://www.docker.com)__
- Clone project to any where you want and go to source folder
- Build image: `docker build . -t cs-flash-cards`
- Run container: `docker run -d -p 8000:8000 --name cs-flash-cards cs-flash-cards`
- Go your browser and type `http://localhost:8000`
*Happy learning!*

0 comments on commit d456b86

Please sign in to comment.