added gunicorn
This commit is contained in:
@ -7,26 +7,21 @@ LABEL maintainer="nouffer@gmail.com"
|
||||
LABEL description="Development image for the Rogaining JP"
|
||||
|
||||
ENV PYTHONDONTWRITEBYTECODE 1
|
||||
|
||||
ENV PYTHONUNBUFFERED 1
|
||||
|
||||
ARG TZ Asia/Tokyo \
|
||||
DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
|
||||
RUN apt-get update -y
|
||||
|
||||
# Install GDAL dependencies
|
||||
RUN apt-get install -y libgdal-dev g++ --no-install-recommends && \
|
||||
apt-get clean -y
|
||||
|
||||
|
||||
|
||||
# Update C env vars so compiler can find gdal
|
||||
ENV CPLUS_INCLUDE_PATH=/usr/include/gdal
|
||||
ENV C_INCLUDE_PATH=/usr/include/gdal
|
||||
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get -y install netcat gcc postgresql \
|
||||
&& apt-get clean
|
||||
@ -49,6 +44,9 @@ RUN apt-get update
|
||||
|
||||
COPY ./requirements.txt /app/requirements.txt
|
||||
|
||||
# Install Gunicorn
|
||||
RUN pip install gunicorn
|
||||
|
||||
#COPY ./wait-for.sh .
|
||||
|
||||
#RUN ["chmod", "+x", "wait-for.sh"]
|
||||
@ -57,3 +55,8 @@ RUN pip install -r requirements.txt
|
||||
|
||||
COPY . /app
|
||||
|
||||
# Collect static files
|
||||
RUN python manage.py collectstatic --noinput
|
||||
|
||||
# Use Gunicorn as the entrypoint
|
||||
CMD ["gunicorn", "config.wsgi:application", "--bind", "0.0.0.0:8000"]
|
||||
|
||||
Reference in New Issue
Block a user