forked from concerto/concerto
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
37 lines (28 loc) · 1.06 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 phusion/passenger-ruby21
MAINTAINER Concerto Authors "[email protected]"
ENV HOME /root
CMD ["/sbin/my_init"]
RUN rm -f /etc/service/nginx/down
RUN rm /etc/nginx/sites-enabled/default
COPY tools/nginx.docker.conf /etc/nginx/sites-enabled/concerto.conf
RUN mkdir /home/app/concerto
WORKDIR /tmp
RUN add-apt-repository "deb http://us.archive.ubuntu.com/ubuntu/ trusty universe"
RUN apt-get update
RUN apt-get install -yqq libreoffice
COPY Gemfile /tmp/
COPY Gemfile-reporting /tmp/
COPY Gemfile-plugins /tmp/
COPY Gemfile.lock /tmp/
COPY lib/command_check_docker.rb /tmp/lib/command_check.rb
RUN bundle install
COPY . /home/app/concerto
RUN mkdir /home/app/concerto/log
RUN chown -R app:app /home/app/concerto
# RUN chmod 700 /home/app/concerto
# RUN chmod 600 /home/app/concerto/log
WORKDIR /home/app/concerto
RUN sudo -u app RAILS_ENV=production rake assets:precompile
WORKDIR /tmp
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
VOLUME ["/home/app/concerto/doc", "/home/app/concerto/log", "/home/app/concerto/tmp", "/home/app/concerto/config"]