File tree Expand file tree Collapse file tree 6 files changed +13
-24
lines changed
Expand file tree Collapse file tree 6 files changed +13
-24
lines changed Original file line number Diff line number Diff line change 66A Flask API server that handles enqueuing and dequeuing students from the office hours queue.
77
88# Quick Started
9- 1 . You will first need to install all the development packages mainly use for
9+ 1 . You will first need to install all the development packages mainly use for, it will allow you to run tools locally for the project.
10+ ``` bash
11+ pip install -r utils.txt
12+ ```
1013
1114# Project structure
1215[ // ] : # ( TODO: Going to do a markdown of a file structure here so that you can see the project structure )
@@ -15,13 +18,11 @@ A Flask API server that handles enqueuing and dequeuing students from the office
1518For this project please use the following python version:
1619` "3.10", "3.11", "3.12" `
1720
18-
1921Running the development server:
2022``` bash
2123docker compose up api-development --build
2224```
2325
24-
2526# Pylint
2627Project uses pylint to keep the code style organized
2728
@@ -37,8 +38,7 @@ Using the Black formatter https://github.com/psf/black
3738black $( git ls-files ' *.py' )
3839```
3940
40-
4141# Resource
4242Good resources to look at:
4343- https://flask.palletsprojects.com/en/stable/blueprints/
44- - https://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-xv-a-better-application-structure
44+ - https://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-xv-a-better-application-structure
Original file line number Diff line number Diff line change 11FROM python:latest
22LABEL authors="tomato"
33
4- ARG API_MODE
5- # This env is now re-used and set again within the container
6- ENV API_MODE=$API_MODE
7-
84WORKDIR app/
95
10- COPY requirements_${API_MODE} .txt requirements.txt
6+ COPY requirements .txt .
117COPY gunicorn.conf.py gunicorn.conf.py
128RUN pip install -r requirements.txt
Original file line number Diff line number Diff line change 11Flask
22gunicorn
3+ requests
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ pylint
2+ black
Original file line number Diff line number Diff line change @@ -2,21 +2,19 @@ services:
22 api-development :
33 build :
44 context : ./api/
5- args :
6- API_MODE : " dev"
5+ environment :
6+ API_MODE : " dev"
77 volumes :
88 - ./api:/app/api
99 ports :
1010 - " 8000:8000"
1111 command : flask --app api.server:app run --debug --host=0.0.0.0 --port=8000
1212
13-
1413 api-production :
1514 extends :
1615 service : api-development
17- build :
18- args :
16+ environment :
1917 API_MODE : " prod"
2018 ports :
2119 - " 8000:8000"
22- command : gunicorn 'api.server:create_app()' # this probably doesn't work
20+ command : gunicorn 'api.server:create_app()'
You can’t perform that action at this time.
0 commit comments