2022-11-19 00:24:43 +00:00
|
|
|
FROM python:3.11.0-slim-buster
|
2022-11-09 04:05:51 +00:00
|
|
|
|
2022-11-20 18:45:50 +00:00
|
|
|
RUN apt-get update && apt-get -y install libpq-dev libxml2-dev libxslt1-dev zlib1g-dev python3-dev build-essential
|
2022-11-09 04:05:51 +00:00
|
|
|
|
|
|
|
COPY requirements.txt requirements.txt
|
|
|
|
|
2022-11-19 00:24:43 +00:00
|
|
|
RUN pip3 install --upgrade pip \
|
|
|
|
&& pip3 install --upgrade -r requirements.txt
|
2022-11-09 04:05:51 +00:00
|
|
|
|
|
|
|
COPY . /takahe
|
|
|
|
|
|
|
|
WORKDIR /takahe
|
2022-11-19 00:24:43 +00:00
|
|
|
|
2022-11-26 17:04:04 +00:00
|
|
|
RUN TAKAHE_DATABASE_URL="postgres://dummy:dummy@localhost/postgres" python3 manage.py collectstatic
|
2022-11-19 00:24:43 +00:00
|
|
|
|
2022-11-09 04:05:51 +00:00
|
|
|
EXPOSE 8000
|
|
|
|
|
2022-11-19 17:20:13 +00:00
|
|
|
# Set some sensible defaults
|
|
|
|
ENV GUNICORN_CMD_ARGS="--workers 8"
|
|
|
|
|
2022-11-22 00:15:00 +00:00
|
|
|
CMD ["gunicorn", "takahe.wsgi:application", "-b", "0.0.0.0:8000"]
|