-
Notifications
You must be signed in to change notification settings - Fork 21
/
Dockerfile
44 lines (32 loc) · 1.06 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
FROM getsentry/sentry-cli:1.63 as sentry
ARG SENTRY_AUTH_TOKEN
ARG SENTRY_ORG
ARG SENTRY_PROJECT
ARG RELEASE
ENV SENTRY_AUTH_TOKEN ${SENTRY_AUTH_TOKEN}
ENV SENTRY_ORG ${SENTRY_ORG}
ENV SENTRY_PROJECT ${SENTRY_PROJECT}
ENV RELEASE ${RELEASE}
RUN sentry-cli releases new ${RELEASE}
RUN sentry-cli releases finalize ${RELEASE}
RUN sentry-cli releases deploys ${RELEASE} new -e "staging"
RUN sentry-cli releases deploys ${RELEASE} new -e "production"
FROM python:3.11
LABEL org.opencontainers.image.authors="webkom@abakus.no"
ARG RELEASE
ENV PYTHONPATH /app/
ENV PYTHONUNBUFFERED 1
ENV ENV_CONFIG 1
ENV RELEASE ${RELEASE}
RUN mkdir /app
COPY pyproject.toml /app/pyproject.toml
WORKDIR /app
RUN pip install poetry
RUN set -e \
&& poetry config virtualenvs.create false \
&& poetry install --with prod --without dev,coverage,mypy,formatting,flake8
COPY . /app/
RUN set -e \
&& echo 'SECRET_KEY="secret"; SERVER_EMAIL="no-reply@abakus.no"' > lego/settings/local.py \
&& ENV_CONFIG=0 python manage.py collectstatic --noinput \
&& ENV_CONFIG=0 make -C docs html