diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..9244a00 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,14 @@ +FROM python:2 +MAINTAINER André Almeida "andre@andrealmeida.net" + +WORKDIR /usr/src/app + +COPY requirements.txt ./ +RUN pip install --no-cache-dir -r requirements.txt + +COPY . . + +EXPOSE 5000 + +ENTRYPOINT [ "python" ] +CMD [ "raspberry-pi-web-info/api.py" ] diff --git a/README.md b/README.md index 711945c..46f2ec6 100644 --- a/README.md +++ b/README.md @@ -45,6 +45,9 @@ Install python2.7 - https://www.python.org/download/releases/2.7/ Install pip - https://pip.pypa.io/en/stable/ +(optional) + +Install docker - https://www.docker.com ### Installing @@ -54,6 +57,13 @@ Please, use the following command to install the requirements packages for this pip install -r requirements.txt ``` +if you prefeer, use docker: + +``` +docker build -t raspberry-project . +docker run -p 5000:5000 raspberry-project +``` + ## Deployment