Refactor code
This commit is contained in:
parent
cbca79a5e9
commit
dbac6270e5
|
@ -10,4 +10,4 @@ COPY . .
|
|||
|
||||
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:
|
||||
flask-api:
|
||||
build: .
|
||||
build:
|
||||
context: ../src
|
||||
dockerfile: ../docker/Dockerfile
|
||||
ports:
|
||||
- 5000:5000
|
||||
environment:
|
||||
FLASK_ENV: production
|
||||
volumes:
|
||||
- ./instance:/app/instance
|
||||
- ../instance:/app/instance
|
4
run.bat
4
run.bat
|
@ -2,5 +2,5 @@
|
|||
|
||||
python -m venv .venv
|
||||
call .venv\Scripts\activate
|
||||
pip install -r requirements.txt
|
||||
python app.py
|
||||
pip install -r src\requirements.txt
|
||||
python src\app.py
|
4
run.sh
4
run.sh
|
@ -2,5 +2,5 @@
|
|||
|
||||
python -m venv .venv
|
||||
source .venv/bin/activate
|
||||
pip install -r requirements.txt
|
||||
python app.py
|
||||
pip install -r src/requirements.txt
|
||||
python src/app.py
|
Loading…
Reference in New Issue