-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
37 lines (25 loc) · 943 Bytes
/
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
37
FROM python:alpine
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
ENV POETRY_VERSION=1.4.0
ENV POETRY_HOME=/opt/poetry
ENV POETRY_VENV=/opt/poetry-venv
ENV POETRY_CACHE_DIR=/opt/.cache
# Add Poetry to PATH
ENV PATH="/opt/poetry/bin:$PATH"
RUN apk update && \
apk upgrade && \
apk --no-cache add curl
WORKDIR /app
COPY . .
RUN curl -sSL https://install.python-poetry.org/ | python3 - && \
poetry install --no-interaction --no-cache
# Collect static files
RUN poetry run python3 ./advertisements/manage.py collectstatic --noinput
# HTTPS Docker framework Django PROT 443 and SSL CERTIFICATES
#EXPOSE 443
#
#ENTRYPOINT ["poetry", "run", "python3", "./advertisements/manage.py", "runserver_plus", "0.0.0.0:443", "--cert-file", "./certificates/fullchain.crt"]
# HTTP Nginx configuration for server PORT 80
EXPOSE 80
ENTRYPOINT ["poetry", "run", "python3", "./advertisements/manage.py", "runserver_plus", "0.0.0.0:80"]