Newer
Older
FROM node:carbon as node
WORKDIR /app/
COPY frontend/package.json .
COPY frontend/yarn.lock .
RUN yarn
# CACHED
COPY frontend/ .
RUN yarn build

Jan Maximilian Michal
committed
# This set is needed otherwise the postgres driver wont work

Jan Maximilian Michal
committed
RUN apk update \
&& apk add --virtual build-deps gcc python3-dev musl-dev curl \
&& apk add --no-cache postgresql-dev
COPY requirements.txt .
RUN pip install -r requirements.txt && rm -rf /root/.cache
COPY --from=node /app/dist /code/frontend/dist
COPY --from=node /app/dist/index.html /code/core/templates/index.html

Jan Maximilian Michal
committed
RUN python util/format_index.py
RUN python manage.py collectstatic --noinput