-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
36 lines (29 loc) · 1 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
FROM python:3.12.5-slim-bookworm
# node version in slim-bookworm is 18.19.0
# postgresql client is 15.8
SHELL ["/bin/bash", "-euo", "pipefail", "-c"]
# Install system packages required by Wagtail and Django.
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 \
&& 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
# Use /app folder as a directory where the source code is stored.
WORKDIR /app
# Install the project requirements.
COPY app/Makefile requirements.txt /app/
RUN make pip-setup && pip-sync requirements.txt
# Copy the source code of the project into the container.
COPY app /app/