File tree Expand file tree Collapse file tree 3 files changed +33
-0
lines changed Expand file tree Collapse file tree 3 files changed +33
-0
lines changed Original file line number Diff line number Diff line change 1+ FROM ubuntu:18.04
2+
3+ RUN apt-get update && \
4+ apt-get install -y python3 python3-pip
5+
6+ WORKDIR /usr/src/app
7+
8+ COPY . .
9+
10+ RUN pip3 install -r requirements/prod.txt
11+
12+ ENV FLASK_APP time_tracker_api
13+
14+ EXPOSE 5000
15+
16+ CMD ["gunicorn" , "-b 0.0.0.0:5000" , "run:app" ]
Original file line number Diff line number Diff line change @@ -111,6 +111,20 @@ as well as its correspondent options.
111111python cli.py gen_swagger_json -f ~/Downloads/swagger.json
112112```
113113
114+ ## Run as docker container
115+
116+ 1 . Build image
117+ ``` bash
118+ docker build -t time_tracker_api:local .
119+ ```
120+
121+ 2 . Run app
122+ ``` bash
123+ docker run -p 5000:5000 time_tracker_api:local
124+ ```
125+
126+ 3 . Visit ` 0.0.0.0:5000 `
127+
114128## Built with
115129- [ Python version 3] ( https://www.python.org/download/releases/3.0/ ) as backend programming language. Strong typing for
116130the win.
Original file line number Diff line number Diff line change @@ -15,5 +15,8 @@ gunicorn==20.0.4
1515#Swagger support for Restful API
1616flask-restplus==0.13.0
1717
18+ #Mocking
19+ Faker==4.0.2
20+
1821#CLI support
1922Flask-Script==2.0.6
You can’t perform that action at this time.
0 commit comments