File tree Expand file tree Collapse file tree 3 files changed +30
-0
lines changed Expand file tree Collapse file tree 3 files changed +30
-0
lines changed Original file line number Diff line number Diff line change 1+ FROM python:3.8-alpine
2+
3+ WORKDIR /usr/src/app
4+
5+ COPY . .
6+
7+ RUN pip3 install -r requirements/prod.txt
8+
9+ ENV FLASK_APP time_tracker_api
10+
11+ EXPOSE 5000
12+
13+ 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 ` 127.0.0.1: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