Files
old-saburly-wagtail-web/Dockerfile

32 lines
759 B
Docker
Raw Normal View History

2024-08-27 20:33:44 +02:00
FROM python:3.8.1-slim-buster
2024-08-27 20:58:41 +02:00
ENV PYTHONUNBUFFERED=1
2024-08-27 20:33:44 +02:00
2024-08-27 20:58:41 +02:00
RUN apt-get update --yes && apt-get install --yes --no-install-recommends \
2024-08-27 20:33:44 +02:00
build-essential \
libpq-dev \
libjpeg62-turbo-dev \
zlib1g-dev \
libwebp-dev \
2024-08-27 20:58:41 +02:00
gettext \
2024-08-27 20:33:44 +02:00
&& rm -rf /var/lib/apt/lists/*
2024-08-27 20:58:41 +02:00
WORKDIR /app
2024-08-27 20:33:44 +02:00
2024-08-27 20:58:41 +02:00
COPY requirements.txt /app/
RUN pip install --upgrade pip \
&& pip install -r /app/requirements.txt
2024-08-27 20:33:44 +02:00
2024-09-22 20:02:30 +02:00
RUN pip install sib-api-v3-sdk
2024-08-27 20:58:41 +02:00
COPY . /app/
2024-08-27 20:33:44 +02:00
RUN python manage.py collectstatic --noinput --clear
2024-09-11 01:42:46 +02:00
RUN python manage.py makemigrations
RUN python manage.py migrate
2024-08-28 17:01:12 +02:00
RUN python manage.py createsuperuser --username "admin" --email "admin@example.com" --password "mysecretpassword"
2024-08-27 20:33:44 +02:00
EXPOSE 8000
2024-08-28 13:41:19 +02:00
CMD ["gunicorn", "--bind", "0.0.0.0:8000", "saburly.wsgi:application"]