aboutsummaryrefslogtreecommitdiff
path: root/Dockerfile
blob: 6f0963b562dc24caf1e2d751c66ab25c74657ae4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
FROM python:3.8-slim AS builder

LABEL maintainer = "Navan Chauhan <navanchauhan@gmail.com>" \
	org.label-schema.name="SaaS-in-a-Flask" \
	org.label-schema.description="https://web.navan.dev/SaaS-in-a-Flask"

EXPOSE 5000

WORKDIR /saas-in-a-flask

COPY requirements.txt api.py ./
RUN pip install -r requirements.txt

COPY ./app ./app

RUN FLASK_APP=app flask database create
RUN FLASK_APP=app flask database admin-create 

CMD gunicorn -w 4 api:app -k uvicorn.workers.UvicornWorker -b "0.0.0.0:5000"