-
Jan Maximilian Michal authored
* using gevnts for async requests handling of gunicorn * serving the static frontend via gunicorn * split requirements into dev and general {
Jan Maximilian Michal authored* using gevnts for async requests handling of gunicorn * serving the static frontend via gunicorn * split requirements into dev and general {
Dockerfile 775 B
# Build Vue files
FROM node:carbon as node
WORKDIR /app/
COPY frontend/ .
RUN npm install
RUN npm run build
# Now fetch other files and build on small image
FROM python:3.6-alpine
ENV PYTHONUNBUFFERED 1
# This set is need otherwise the postgres driver wont work
RUN apk update \
&& apk add --virtual build-deps gcc python3-dev musl-dev curl \
&& apk add --no-cache postgresql-dev
RUN mkdir -p /usr/share/dict
RUN curl -s https://gitlab.gwdg.de/snippets/51/raw --output /usr/share/dict/words
WORKDIR /code
COPY . /code
COPY --from=node /app/dist /code/frontend/dist
COPY --from=node /app/dist/index.html /code/core/templates/index.html
RUN pip install -r requirements.txt && rm -rf /root/.cache
RUN python manage.py collectstatic --noinput
RUN apk del build-deps