-
Notifications
You must be signed in to change notification settings - Fork 8
/
Dockerfile
44 lines (36 loc) · 899 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
39
40
41
42
43
44
FROM python:2.7
ARG python_requirements=requirements/production.txt
WORKDIR /srv/studlan
# Install requirements
COPY requirements/ requirements/
RUN \
apt-get update && \
apt-get install -y gettext cron && \
rm -rf /var/lib/apt/lists/* && \
python -m pip install --no-cache-dir -r "$python_requirements" --upgrade
# Add app files
COPY studlan studlan
COPY apps apps
COPY files files
COPY templates templates
COPY locale locale
COPY manage.py ./
COPY docker-entrypoint.sh ./
COPY uwsgi.ini ./
RUN mkdir -p log
RUN chmod +x docker-entrypoint.sh
# Compile translations
COPY setup/local.template.py studlan/settings/local.py
RUN python manage.py compilemessages --locale=nb
RUN rm -f studlan/settings/local.py
# Add misc files
COPY CHANGELOG.md ./
COPY CONTRIBUTORS ./
COPY LICENSE.txt ./
COPY MAINTAINERS ./
COPY VERSION ./
# HTTP
EXPOSE 8080
# uWSGI
EXPOSE 8081
CMD ["./docker-entrypoint.sh"]