-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDOCKERFILE
39 lines (27 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
FROM hackoregoncivic/backend-docker-django
MAINTAINER Brian H. Grant <[email protected]> & "M. Edward (Ed) Borasky <[email protected]>
ENV PYTHONUNBUFFERED 1
ARG DEBUG=false
WORKDIR /code
# Put all requirements files in the workdir
COPY /requirements/* /code/
# Copy the django apps to be installed locally via pip
COPY hackoregon_sandbox /code/hackoregon_sandbox
# upgrade pip first
RUN pip install --upgrade pip
RUN if [ "$DEBUG" = true ] ; then pip install -r development.txt ; else pip install -r production.txt ; fi
# set environment variables
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
RUN python
# src_files is home to all the django files that "wrap" the django apps installed by pip
RUN mkdir src_files
# Copy all scripts and make sure they are executable
COPY scripts /code/src_files/scripts/
RUN chmod +x *.py
# Copy settings and staticfiles to make sure they are baked into the container
# rather than always expecting them to be mounted at runtime.
COPY local_settings /code/src_files/local_settings
COPY credentials.json /code/src_files/credentials.json
COPY packages.json /code/src_files/packages.json
ENTRYPOINT [ "/code/src_files/scripts/build-run/docker-entrypoint.sh" ]