-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
37 lines (28 loc) · 1.25 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
FROM debian:wheezy
RUN apt-get update && apt-get -y install --no-install-recommends bash git curl ca-certificates supervisor python-dev python-pip make gcc libpq-dev uwsgi nginx && apt-get clean
RUN echo "deb http://www.rabbitmq.com/debian/ testing main" >> /etc/apt/sources.list
RUN curl https://www.rabbitmq.com/rabbitmq-signing-key-public.asc | apt-key add -
RUN apt-get update && apt-get -y install --no-install-recommends rabbitmq-server && apt-get clean
# Gunnery
RUN git clone --branch v0.2-alpha https://github.com/gunnery/gunnery.git /var/gunnery
WORKDIR /var/gunnery
RUN pip install -r requirements/production.txt
RUN useradd gunnery
RUN mkdir -p /var/gunnery/log /var/gunnery/run
RUN chown gunnery:gunnery /var/gunnery/log /var/gunnery/run
# Docs
RUN cd docs; make htmlembedded
# uWSGI
ADD uwsgi.ini /etc/uwsgi/apps-enabled/gunnery.ini
# nginx
RUN echo "daemon off;" >> /etc/nginx/nginx.conf
RUN rm /etc/nginx/sites-enabled/default
ADD nginx.django.conf /etc/nginx/sites-enabled/gunnery.conf
# Supervisor setup
RUN mkdir -p /var/log/supervisor /opt/supervisor
ADD gunnery.conf /etc/supervisor/conf.d/gunnery.conf
# Override ALLOWED_HOSTS
ADD production.py /var/gunnery/gunnery/gunnery/settings/production.py
EXPOSE 8080
ADD run.sh /opt/run.sh
CMD ["/opt/run.sh"]