fix wsgi.py;
added entrypoint.sh as django entrypoint; install and use gunicorn as prod server;
This commit is contained in:
+15
-15
@@ -1,21 +1,21 @@
|
||||
FROM python:3.8-slim
|
||||
FROM python:3.8-slim
|
||||
ENV PYTHONUNBUFFERED 1
|
||||
ENV PATH="/opt/venv/bin:$PATH"
|
||||
|
||||
ENV PYTHONUNBUFFERED 1
|
||||
RUN apt-get update; \
|
||||
apt-get install -y build-essential gcc; \
|
||||
python -m venv /opt/venv; \
|
||||
python -m pip install --upgrade pip; \
|
||||
mkdir /code;
|
||||
|
||||
RUN apt-get update; \
|
||||
apt-get install -y build-essential gcc; \
|
||||
python -m venv /opt/venv; \
|
||||
python -m pip install --upgrade pip;
|
||||
WORKDIR /code
|
||||
|
||||
ENV PATH="/opt/venv/bin:$PATH"
|
||||
COPY setup.py /code/
|
||||
COPY requirements.txt /code/
|
||||
|
||||
RUN mkdir /code
|
||||
RUN pip install -r requirements.txt
|
||||
|
||||
WORKDIR /code
|
||||
COPY . /code/
|
||||
|
||||
COPY setup.py /code/
|
||||
COPY requirements.txt /code/
|
||||
|
||||
RUN pip install -r requirements.txt
|
||||
|
||||
COPY . /code/
|
||||
RUN chmod 777 scripts/entrypoint.sh
|
||||
ENTRYPOINT ["scripts/entrypoint.sh"]
|
||||
|
||||
Reference in New Issue
Block a user