2022-11-27 22:20:26 -08:00
|
|
|
ARG IMAGE_HOST=python
|
|
|
|
ARG IMAGE_LABEL=3.11.0-slim-buster
|
|
|
|
|
|
|
|
FROM ${IMAGE_HOST}:${IMAGE_LABEL}
|
2022-11-08 20:05:51 -08:00
|
|
|
|
2022-11-20 10:45:50 -08:00
|
|
|
RUN apt-get update && apt-get -y install libpq-dev libxml2-dev libxslt1-dev zlib1g-dev python3-dev build-essential
|
2022-11-08 20:05:51 -08:00
|
|
|
|
|
|
|
COPY requirements.txt requirements.txt
|
|
|
|
|
2022-11-18 16:24:43 -08:00
|
|
|
RUN pip3 install --upgrade pip \
|
|
|
|
&& pip3 install --upgrade -r requirements.txt
|
2022-11-08 20:05:51 -08:00
|
|
|
|
|
|
|
COPY . /takahe
|
|
|
|
|
|
|
|
WORKDIR /takahe
|
2022-11-18 16:24:43 -08:00
|
|
|
|
2022-11-30 09:39:50 -08:00
|
|
|
RUN TAKAHE_DATABASE_SERVER="postgres://x@example.com/x" python3 manage.py collectstatic --noinput
|
2022-11-18 16:24:43 -08:00
|
|
|
|
2022-11-08 20:05:51 -08:00
|
|
|
EXPOSE 8000
|
|
|
|
|
2022-11-19 09:20:13 -08:00
|
|
|
# Set some sensible defaults
|
|
|
|
ENV GUNICORN_CMD_ARGS="--workers 8"
|
|
|
|
|
2022-11-21 16:15:00 -08:00
|
|
|
CMD ["gunicorn", "takahe.wsgi:application", "-b", "0.0.0.0:8000"]
|