forked from rapidpro/ureport
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Dockerfile
43 lines (27 loc) · 1.17 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
FROM ubuntu:14.04
ENV HOME /root
ENV TERM screen-256color
RUN locale-gen --no-purge en_US.UTF-8
ENV LC_ALL en_US.UTF-8
RUN update-locale LANG=en_US.UTF-8
RUN apt-get update -qq
ADD conf/apt-packages.txt /tmp/apt-packages.txt
RUN cat /tmp/apt-packages.txt | xargs apt-get --yes --force-yes install
ADD conf/npm-packages.txt /tmp/npm-packages.txt
RUN cat /tmp/npm-packages.txt | xargs npm install -g
ADD pip-requires.txt /tmp/requirements_requires.txt
RUN pip install -r /tmp/requirements_requires.txt
ADD pip-freeze.txt /tmp/requirements.txt
RUN pip install -r /tmp/requirements.txt
WORKDIR /code
ADD ./ /code/
RUN mkdir -p /var/log/ureport
ADD conf/entrypoint.sh /usr/local/bin/entrypoint.sh
RUN chmod +x /usr/local/bin/entrypoint.sh
RUN mkdir -p /etc/supervisor/conf.d && mkdir -p /var/log/supervisor
RUN ln -sf /code/conf/supervisor.ureport.conf /etc/supervisor/conf.d/ureport.conf
RUN ln -sf /code/conf/supervisord.conf /etc/supervisor/supervisord.conf
RUN ln -sf /usr/bin/nodejs /usr/bin/node
ADD conf/nginx.ureport.conf /etc/nginx/sites-enabled/default
RUN mkdir -p /var/www/static && chmod -R 777 /var/www/static/ && chown -R www-data:www-data /var/www/static
EXPOSE 8000