forked from openlegaldata/oldp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
35 lines (25 loc) · 847 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
# start from an official image
FROM python:3.6
# arbitrary location choice: you can change the directory
RUN mkdir /app
WORKDIR /app
RUN curl -sL https://deb.nodesource.com/setup_8.x | bash
RUN apt-get install -y nodejs
# copy our project code
COPY . /app
ENV DJANGO_SETTINGS_MODULE=oldp.settings
ENV DJANGO_CONFIGURATION=Dev
ENV DATABASE_URL="sqlite:///dev.db"
ENV DJANGO_SECRET_KEY=foobar12
# install our dependencies
RUN pip install -r requirements.txt
RUN npm install
RUN npm run-script build
RUN python manage.py collectstatic --no-input
# Locale
#RUN apt-get install gettext
#RUN python manage.py compilemessages --l de --l en
# expose the port 8000
EXPOSE 8000
# define the default command to run when starting the container
CMD ["gunicorn", "--bind", ":8000", " --log-file", "-", "--log-level", "debug", "oldp.wsgi:application"]