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.
111
111
python cli.py gen_swagger_json -f ~/Downloads/swagger.json
112
112
```
113
113
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
+
114
128
## Built with
115
129
- [ Python version 3] ( https://www.python.org/download/releases/3.0/ ) as backend programming language. Strong typing for
116
130
the win.
Original file line number Diff line number Diff line change @@ -15,5 +15,8 @@ gunicorn==20.0.4
15
15
#Swagger support for Restful API
16
16
flask-restplus==0.13.0
17
17
18
+ #Mocking
19
+ Faker==4.0.2
20
+
18
21
#CLI support
19
22
Flask-Script==2.0.6
You can’t perform that action at this time.
0 commit comments