This repository was archived by the owner on Nov 28, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathDockerfile
More file actions
45 lines (33 loc) · 1.3 KB
/
Dockerfile
File metadata and controls
45 lines (33 loc) · 1.3 KB
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
FROM ubuntu:14.04
# Borrowing heavily from https://github.com/rehabstudio/docker-gunicorn-nginx
# keep upstart quiet
RUN dpkg-divert --local --rename --add /sbin/initctl
RUN ln -sf /bin/true /sbin/initctl
# no tty and a path var
ENV DEBIAN_FRONTEND noninteractive
ENV MHVDB2_PATH /opt/mhvdb2
# get up to date
RUN apt-get update --fix-missing && apt-get install -y build-essential git python-pip python3 python3-setuptools python3-pip nginx supervisor
# stop supervisor - we'll start it ourselves
RUN service supervisor stop
# Create some dirs
RUN mkdir -p /var/log/supervisor
RUN mkdir $MHVDB2_PATH
# Install supervisor-stdout
RUN pip install supervisor-stdout
# Add settings files and the like (these should be as low as possible
# in the order as things past here aren't cached)
# docker run mhvdb2 -v /opt/mhvdb2:/opt/mhvdb2
VOLUME ["/opt/mhvdb2"]
ADD supervisord.conf /etc/supervisor/conf.d/supervisord.conf
ADD requirements.txt $MHVDB2_PATH/
ADD nginx.conf /etc/nginx/nginx.conf
RUN cat /usr/lib/ssl/certs/*.crt > /usr/lib/ssl/certs/bundle.CA_BUNDLE
# Install requirements from txt file
RUN cd $MHVDB2_PATH && pip3 install -r requirements.txt
# Restart nginx to load the config
RUN service nginx stop
# Expose our port
EXPOSE 80
# Load supervisord
CMD supervisord -c /etc/supervisor/conf.d/supervisord.conf -n