Refactor code
This commit is contained in:
parent
cbca79a5e9
commit
dbac6270e5
|
@ -10,4 +10,4 @@ COPY . .
|
||||||
|
|
||||||
EXPOSE 5000
|
EXPOSE 5000
|
||||||
|
|
||||||
CMD ["gunicorn", "-w", "4", "-b", "0.0.0.0:5000", "app:app"]
|
CMD ["gunicorn", "--preload", "-w", "4", "-b", "0.0.0.0:5000", "app:app"]
|
|
@ -1,9 +1,11 @@
|
||||||
services:
|
services:
|
||||||
flask-api:
|
flask-api:
|
||||||
build: .
|
build:
|
||||||
|
context: ../src
|
||||||
|
dockerfile: ../docker/Dockerfile
|
||||||
ports:
|
ports:
|
||||||
- 5000:5000
|
- 5000:5000
|
||||||
environment:
|
environment:
|
||||||
FLASK_ENV: production
|
FLASK_ENV: production
|
||||||
volumes:
|
volumes:
|
||||||
- ./instance:/app/instance
|
- ../instance:/app/instance
|
4
run.bat
4
run.bat
|
@ -2,5 +2,5 @@
|
||||||
|
|
||||||
python -m venv .venv
|
python -m venv .venv
|
||||||
call .venv\Scripts\activate
|
call .venv\Scripts\activate
|
||||||
pip install -r requirements.txt
|
pip install -r src\requirements.txt
|
||||||
python app.py
|
python src\app.py
|
4
run.sh
4
run.sh
|
@ -2,5 +2,5 @@
|
||||||
|
|
||||||
python -m venv .venv
|
python -m venv .venv
|
||||||
source .venv/bin/activate
|
source .venv/bin/activate
|
||||||
pip install -r requirements.txt
|
pip install -r src/requirements.txt
|
||||||
python app.py
|
python src/app.py
|
Loading…
Reference in New Issue