forked from loggi/curso-testes-pratica
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
38 lines (29 loc) · 856 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
38
FROM python:3.6
# Set environment variables
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
WORKDIR /app
# Install env dependencies
RUN apt-get update \
&& apt-get install -y \
&& apt-get install -y --no-install-recommends \
gdal-bin libgdal-dev libproj-dev
RUN export CPLUS_INCLUDE_PATH=/usr/include/gdal
RUN export C_INCLUDE_PATH=/usr/include/gdal
RUN pip install --upgrade pip
RUN pip install pipenv
# Install app dependencies
COPY ./requirements/Pipfile /app/Pipfile
RUN pipenv install --deploy --system --skip-lock --dev
# Set django app env vars
ENV DJANGO_ENV=dev
ENV DOCKER_CONTAINER=1
ENV SECRET_KEY="=97qk!l@&ueeb*la!wya#7c@o#1kfu&*s#ptv42mn59ym!=(1="
ENV POSTGRES_HOST=db
ENV POSTGRES_NAME=postgres
ENV POSTGRES_USER=postgres
ENV POSTGRES_PASSWORD=postgres
ENV POSTGRES_PORT=5432
EXPOSE 8000
# Copy project
COPY . /app/