-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
39 lines (25 loc) · 789 Bytes
/
Dockerfile
File metadata and controls
39 lines (25 loc) · 789 Bytes
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
###########
# BUILDER #
###########
FROM python:3.10-buster
LABEL maintainer="Enes Gulakhmet <wwho.mann.3@gmail.com>"
RUN apt-get update -y && apt-get install -y netcat
# create the appropriate directories
ENV HOME=/usr/src/app
WORKDIR $HOME
ARG DJANGO_SECRET_KEY="DJANGO_SECRET_KEY"
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
COPY . $HOME
RUN pip install --upgrade pip && pip install --no-cache-dir -r requirements.txt
COPY docker/entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENV STATIC_URL /static
ENV STATIC_PATH static
ENV MEDIA_URL /media
ENV MEDIA_PATH media
RUN python manage.py collectstatic
EXPOSE 80
HEALTHCHECK --interval=12s --timeout=12s --start-period=10s \
CMD curl --fail http://localhost/health || exit 1
ENTRYPOINT ["/entrypoint.sh"]