This repository was archived by the owner on Jun 8, 2018. It is now read-only.
Repository navigation
Expand file tree
/
Copy pathDockerfile
More file actions
85 lines (58 loc) · 2.35 KB
/
Copy pathDockerfile
File metadata and controls
85 lines (58 loc) · 2.35 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
FROM ubuntu
MAINTAINER Joshua Ashby "joshuaashby@joshashby.com"
# update things and install nice things
RUN apt-get update
RUN apt-get -y install wget g++ curl libssl-dev apache2-utils git-core python python-pip python-dev libffi-dev
#RUN mkdir /root/.ssh
#RUN touch /root/.ssh/known_hosts
#RUN ssh-keyscan github.com >> /root/.ssh/known_hosts
# RethinkDB
RUN echo "deb http://download.rethinkdb.com/apt trusty main" | tee /etc/apt/sources.list.d/rethinkdb.list
RUN wget -O- http://download.rethinkdb.com/apt/pubkey.gpg | apt-key add -
RUN apt-get update
RUN apt-get -y install rethinkdb
# web UI process cluster
EXPOSE 8080 28015 29015
# Redis
RUN apt-get -y install redis-server
EXPOSE 6379
# nginx
RUN apt-get -y install nginx
EXPOSE 80
EXPOSE 443
# build node.js because ubuntu can't keep things updated
RUN git clone git://github.com/joyent/node.git
WORKDIR /node
RUN ./configure;
RUN make
RUN make install
# add the rethink config
VOLUME /data
RUN chown rethinkdb:rethinkdb /data
RUN chmod u+rwx /data
ADD rethinkdb.conf /etc/rethinkdb/instances.d/instance1.conf
# Transientbug nginx
VOLUME /var/www
ADD transientbug/ /etc/nginx/transientbug
ADD nginx /etc/nginx/sites-available/transientbug
RUN ln -s /etc/nginx/sites-avalabled/transientbug /etc/nginx/sites-enabled/
# Start the services we need for transientbug
RUN service rethinkdb start
RUN service redis-server start
RUN service nginx start
# Transientbug site and assets
RUN mkdir /var/www/i
RUN mkdir /transientBug
WORKDIR /transientBug
RUN git clone git://github.com/transientBug/transientBug.git /transientBug
RUN git checkout dev
RUN npm install
RUN pip install -r requirements.txt
RUN ln -s /transientBug/app/config/live/config_live.yaml /transientBug/app/config/config.yaml
RUN ln -s /transientBug/app/config/live/initial_live.yaml /transientBug/app/config/initial.yaml
RUN ./node_modules/grunt-cli/bin/grunt
RUN cp -r interface/build/* /var/www
ADD /backups /backups
WORKDIR /backups
RUN rethinkdb restore db_backup.tar.gz
RUN tar -xvzf image_backup.tar.gz -C /var/www/i/