Added Dockerfile and updated README file instructions 🎉🎊

This commit is contained in:
André Almeida 2019-10-11 16:57:50 +01:00
parent f7fde9b3fe
commit ef36743453
2 changed files with 24 additions and 0 deletions

14
Dockerfile Normal file
View File

@ -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" ]

View File

@ -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