docker-izing it so it can be deployed

redesign
Mark Cotton 2023-07-14 12:06:57 -05:00
parent 842d067502
commit a26ef602fa
5 changed files with 39 additions and 0 deletions

15
Dockerfile Normal file
View File

@ -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" ]

13
docker-compose.yaml Normal file
View File

@ -0,0 +1,13 @@
version: '3'
services:
app:
build: .
volumes:
- .:/app
ports:
- "9300:3000"
restart: always
tty: true
user: 1000:1000

View File

@ -13,3 +13,6 @@ pytz==2023.3
requests==2.29.0
urllib3==1.26.16
Werkzeug==2.3.6
gunicorn==20.1.0
cachelib==0.10.2
Flask-Session==0.5.0

4
startup.sh Executable file
View File

@ -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

4
wsgi.py Normal file
View File

@ -0,0 +1,4 @@
from app import app
if __name__ == "__main__":
app.run()