forked from kartoza/flask_user_map
-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathDockerfile
More file actions
43 lines (36 loc) · 1.55 KB
/
Copy pathDockerfile
File metadata and controls
43 lines (36 loc) · 1.55 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
#-------------- Base System Config ------------------------------------------
FROM ubuntu:12.04
RUN export DEBIAN_FRONTEND=noninteractive
ENV DEBIAN_FRONTEND noninteractive
RUN dpkg-divert --local --rename --add /sbin/initctl
RUN ln -s /bin/true /sbin/initctl
# Set the pwd of root to 'inasafe'
RUN echo "root:usermap" | chpasswd
#-------------- Apt Config --------------------------------------------------
# Use this if deploying on a Hetzner server
#ADD hetzner-sources.list /etc/apt/sources.list
# Otherwise this:
ADD sources.list /etc/apt/sources.list
#-------------- Add user for web app ----------------------------------------
RUN adduser --home=/home/web --gecos 'user_map' web
#-------------- Install deps ------------------------------------------------
RUN apt-get update
RUN apt-get -y install git
RUN apt-get -y install python-virtualenv
RUN apt-get -y install python-dev build-essential
RUN pip install uwsgi
RUN apt-get -y install nginx
RUN apt-get -y install supervisor
#-------------- Check out the sources from GIT ------------------------------
# We should actually be able to run git clone here but it didnt work using RUN
# so we delegate the work to a script rather.
# The script below also
# wget -O post-setup.sh https://raw.github.com/timlinux/user_map/master/docker/post-setup.sh
ADD post-setup.sh /tmp/post-setup.sh
RUN /tmp/post-setup.sh
#-------------- Clean up any junk ----------------------
RUN apt-get -y purge build-essential
RUN apt-get -y autoremove
# Define which ports get made public
EXPOSE 80
CMD ["/usr/bin/supervisord", "-n"] -D