add docker file

This commit is contained in:
tinpee
2016-10-17 09:01:26 +07:00
parent e299ca95b8
commit d456b8668f
2 changed files with 19 additions and 1 deletions

11
Dockerfile Normal file
View File

@@ -0,0 +1,11 @@
FROM python
MAINTAINER Tinpee <tinpee.dev@gmail.com>
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"]

View File

@@ -52,4 +52,11 @@ It uses:
1. When you're ready to start memorizing, click either "General" or "Code" 1. When you're ready to start memorizing, click either "General" or "Code"
in the top menu. 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!*