-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
31 lines (22 loc) · 930 Bytes
/
Copy pathDockerfile
File metadata and controls
31 lines (22 loc) · 930 Bytes
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
FROM python:3.12-slim
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
PIP_NO_CACHE_DIR=1 \
TAILWIND_CLI_PATH=/opt/django_tailwind_cli
WORKDIR /app
RUN apt-get update \
&& apt-get install -y --no-install-recommends build-essential libpq-dev \
&& rm -rf /var/lib/apt/lists/*
COPY pyproject.toml README.md manage.py /app/
COPY src /app/src
COPY assets /app/assets
COPY templates /app/templates
COPY docker /app/docker
RUN pip install --upgrade pip setuptools wheel && pip install -e '.[dev]'
RUN python /app/manage.py tailwind download_cli
COPY . /app
RUN install -m 755 /app/docker/entrypoint.py /usr/local/bin/docker-entrypoint.py \
&& install -m 755 /app/docker/start_web.py /usr/local/bin/start-web.py
WORKDIR /app/src
ENTRYPOINT ["python", "/usr/local/bin/docker-entrypoint.py"]
CMD ["gunicorn", "workspace.wsgi:application", "--bind", "0.0.0.0:8000", "--workers", "3", "--timeout", "120"]