-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
35 lines (24 loc) · 1.26 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
FROM ubuntu:14.04
MAINTAINER Kate Heddleston <[email protected]>
RUN DEBIAN_FRONTEND=noninteractive apt-get update --fix-missing && apt-get install -y build-essential git python python-dev python-setuptools supervisor bcrypt libssl-dev libffi-dev libpq-dev vim rsyslog wget libjpeg-dev libpng-dev
RUN easy_install pip
# stop supervisor service as we'll run it manually
RUN service supervisor stop
RUN mkdir /var/log/gunicorn && mkdir /var/log/deploys
RUN mkdir /opt/code
# Add logging conf file
RUN wget -O ./remote_syslog.tar.gz https://github.com/papertrail/remote_syslog2/releases/download/v0.17/remote_syslog_linux_amd64.tar.gz && tar xzf ./remote_syslog.tar.gz && cp ./remote_syslog/remote_syslog /usr/bin/remote_syslog && rm ./remote_syslog.tar.gz && rm -rf ./remote_syslog/
# Add remote syslog config files
COPY ./docker_files/log_files.yml /etc/log_files.yml
# Add supervisor
COPY ./docker_files/supervisord.conf /opt/code/
RUN ln -s /opt/code/supervisord.conf /etc/supervisor/conf.d/
# Add requirements and install
COPY ./docker_files/requirements.txt /opt/code/
RUN pip install -r /opt/code/requirements.txt
# Add github repo code to code file
COPY . /opt/code/
WORKDIR /opt/code
# expose port(s)
EXPOSE 80
CMD supervisord -c /etc/supervisor/conf.d/supervisord.conf