Debian Codegraph @

Dockerfile

raw
1 FROM python:3.11-slim
2 WORKDIR /build
3
4 RUN apt-get update
5 RUN apt-get install -y --no-install-recommends gcc libpq-dev
6 RUN rm -rf /var/lib/apt/lists/*
7
8 COPY pyproject.toml .
9 COPY src src
10 RUN pip install .
11
12 COPY requirements requirements
13 RUN pip install -r requirements/testproj.txt
14 RUN pip install psycopg2-binary gunicorn whitenoise
15
16 COPY testproj .
17 RUN python manage.py collectstatic --noinput
18 RUN python manage.py migrate
19
20 CMD ["gunicorn", "testproj.wsgi:application", "--bind", "0.0.0.0:80"]