-
Notifications
You must be signed in to change notification settings - Fork 20
/
Dockerfile
62 lines (51 loc) · 1.7 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# import base image
FROM ubuntu:trusty
# install system-wide dependencies,
# python3 and the build-time dependencies for c modules
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
python3 python3-dev python3-pip python3-lxml \
build-essential libffi-dev git \
libtiff5-dev libjpeg8-dev zlib1g-dev \
libfreetype6-dev liblcms2-dev libwebp-dev \
curl libfontconfig nodejs npm nginx \
&& echo "\ndaemon off;" >> /etc/nginx/nginx.conf \
&& rm /etc/nginx/sites-enabled/default \
&& ln --symbolic /usr/bin/nodejs /usr/bin/node
RUN npm install -g npm
RUN npm -g install grunt-cli bower
# Set the locale
RUN locale-gen en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
# setup the environment
WORKDIR /opt/superdesk/
COPY ./docker/nginx.conf /etc/nginx/nginx.conf
COPY ./docker/superdesk_vhost.conf /etc/nginx/sites-enabled/superdesk.conf
COPY ./docker/start.sh /opt/superdesk/start.sh
CMD /opt/superdesk/start.sh
# client ports
EXPOSE 9000
EXPOSE 80
# server ports
EXPOSE 5000
EXPOSE 5100
# set env vars for the server
ENV PYTHONUNBUFFERED 1
ENV C_FORCE_ROOT "False"
ENV CELERYBEAT_SCHEDULE_FILENAME /tmp/celerybeatschedule.db
# install server dependencies
COPY ./server/requirements.txt /tmp/requirements.txt
RUN cd /tmp && pip3 install -U -r /tmp/requirements.txt
# install client dependencies
COPY ./client/package.json /opt/superdesk/client/
RUN cd ./client && npm install
COPY ./client/bower.json /opt/superdesk/client/
COPY ./client/.bowerrc /opt/superdesk/client/
RUN cd ./client && bower --allow-root install
# copy server sources
COPY ./server /opt/superdesk
# copy client sources
COPY ./client /opt/superdesk/client
RUN cd ./client && grunt build