-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
46 lines (37 loc) · 1.19 KB
/
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
38
39
40
41
42
43
44
45
46
## base image
FROM python:3.7.5-slim-buster as base
FROM base as builder
LABEL maintainer="Pritam K Dey <[email protected]"
## install dependencies
#RUN apt-get update && \
# apt-get upgrade -y && \
# apt-get install -y netcat-openbsd gcc libpq-dev postgresql-client postgresql-client-common && \
# apt-get install libspatialindex-dev -y && \
# apt-get clean
RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y netcat-openbsd gcc && \
apt-get install libspatialindex-dev -y && \
apt-get clean
## set environment variables
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
ENV PYROOT /pyroot
ENV PATH $PYROOT/bin:$PATH
ENV PYTHONUSERBASE $PYROOT
RUN mkdir /app
WORKDIR /app
COPY Pipfile /app/Pipfile
COPY Pipfile.lock /app/Pipfile.lock
RUN pip install --upgrade pip
RUN pip install pipenv
RUN set -ex && PIP_USER=1 pipenv install --system --deploy -v
ADD . /app/
RUN mkdir /app/airpollution/migrations
RUN touch /app/airpollution/migrations/__init__.py
EXPOSE 8000
#CMD sleep 365d
WORKDIR /app
#CMD [ "python", "manage.py runserver 0.0.0.0:8000" ]
ENTRYPOINT ["/app/docker-entrypoint.sh"]
#CMD gunicorn eugreendeal.wsgi:application - bind 0.0.0.0:8000 - workers 3