docker-izing it so it can be deployed
parent
842d067502
commit
a26ef602fa
|
@ -0,0 +1,15 @@
|
||||||
|
|
||||||
|
FROM python:3.9-slim
|
||||||
|
|
||||||
|
COPY ./requirements.txt /app/requirements.txt
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
RUN apt update
|
||||||
|
|
||||||
|
RUN pip install --upgrade pip
|
||||||
|
|
||||||
|
RUN pip install -r requirements.txt
|
||||||
|
|
||||||
|
|
||||||
|
CMD [ "./startup.sh" ]
|
|
@ -0,0 +1,13 @@
|
||||||
|
version: '3'
|
||||||
|
|
||||||
|
services:
|
||||||
|
app:
|
||||||
|
build: .
|
||||||
|
volumes:
|
||||||
|
- .:/app
|
||||||
|
ports:
|
||||||
|
- "9300:3000"
|
||||||
|
restart: always
|
||||||
|
tty: true
|
||||||
|
user: 1000:1000
|
||||||
|
|
|
@ -13,3 +13,6 @@ pytz==2023.3
|
||||||
requests==2.29.0
|
requests==2.29.0
|
||||||
urllib3==1.26.16
|
urllib3==1.26.16
|
||||||
Werkzeug==2.3.6
|
Werkzeug==2.3.6
|
||||||
|
gunicorn==20.1.0
|
||||||
|
cachelib==0.10.2
|
||||||
|
Flask-Session==0.5.0
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
#python3 -u server.py
|
||||||
|
gunicorn --bind 0.0.0.0:3000 --limit-request-line 0 --worker-class=gthread --threads=4 wsgi:app
|
Loading…
Reference in New Issue