2023-04-19 23:48:59 +02:00
|
|
|
# syntax=docker/dockerfile:1
|
|
|
|
FROM python:3.9.2-slim AS development
|
|
|
|
|
|
|
|
WORKDIR /src
|
|
|
|
|
|
|
|
RUN pip install pymysql
|
|
|
|
|
2023-04-20 20:12:21 +02:00
|
|
|
ADD https://git.zeus.gent/haldis/menus/-/archive/master/menus-master.tar /tmp
|
|
|
|
RUN mkdir menus && \
|
|
|
|
tar --directory=menus --extract --strip-components=1 --file=/tmp/menus-master.tar
|
|
|
|
|
2023-04-19 23:48:59 +02:00
|
|
|
COPY requirements.txt .
|
|
|
|
RUN pip install -r requirements.txt
|
|
|
|
|
|
|
|
COPY . .
|
|
|
|
|
|
|
|
WORKDIR /src/app
|
|
|
|
CMD python app.py db upgrade && \
|
|
|
|
python app.py runserver -h 0.0.0.0 -p 8000
|
|
|
|
|
|
|
|
FROM development AS production
|
|
|
|
|
|
|
|
RUN pip install waitress
|
|
|
|
|
|
|
|
CMD python app.py db upgrade && \
|
2023-04-20 02:33:36 +02:00
|
|
|
python waitress_wsgi.py
|