-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
51 lines (40 loc) · 1.28 KB
/
Dockerfile
File metadata and controls
51 lines (40 loc) · 1.28 KB
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
45
46
47
48
49
50
51
FROM python:3.14.0-trixie
SHELL ["/bin/bash", "-euo", "pipefail", "-c"]
# Install system packages required by Wagtail and Django.
# hadolint ignore=DL3008
RUN apt-get update --yes --quiet && apt-get install --yes --quiet --no-install-recommends \
build-essential \
curl \
libpq-dev \
libjpeg62-turbo-dev \
postgresql-client \
zlib1g-dev \
libwebp-dev \
npm \
&& rm -rf /var/lib/apt/lists/*
# Port used by this container to serve HTTP.
EXPOSE 8080
# Set environment variables.
# 1. Force Python stdout and stderr streams to be unbuffered.
# 2. Set PORT variable that is used by Gunicorn. This should match "EXPOSE"
# command.
ENV PYTHONUNBUFFERED=1 \
PORT=8080 \
DJANGO_SETTINGS_MODULE=alloydflanagan.settings.production
# Use /app folder as a directory where the source code is stored.
WORKDIR /app
# Copy the source code of the project into the container.
COPY app /app/
#TODO: get uv to use system python instead of downloading -- faster, more reliable.
RUN pip install --no-cache-dir uv==0.9.7 && \
uv sync --frozen --no-dev
# hadolint ignore=DL3016
RUN npm install -g npm; \
npm install -g n; \
n 24
RUN corepack enable
# hadolint ignore=DL3016
RUN yarn; \
yarn build
# Note: Fly automatically sets DATABASE_URL
CMD ["make", "run-server"]