-
Notifications
You must be signed in to change notification settings - Fork 5
/
Dockerfile
30 lines (20 loc) · 857 Bytes
/
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
FROM phusion/passenger-customizable:2.5.0
RUN /pd_build/nodejs.sh
RUN /pd_build/ruby-3.1.*.sh
# Set correct environment variables.
ENV HOME /root
RUN rm -f /etc/service/nginx/down
RUN rm /etc/nginx/sites-enabled/default
WORKDIR /home/app/webapp
ADD . /home/app/webapp
ADD docker/webapp.conf /etc/nginx/sites-enabled/default
ADD docker/secret_key.conf /etc/nginx/main.d/secret_key.conf
ADD docker/settings/production.yml /home/app/webapp/config/settings/production.yml
RUN bundle install --deployment
RUN SECRET_KEY_BASE=x rake assets:precompile
RUN SECRET_KEY_BASE=x bundle exec whenever --update-cron
RUN chown app -R /home/app/webapp/log /home/app/webapp/db
RUN chmod u+wr -R /home/app/webapp/log /home/app/webapp/db
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# Use baseimage-docker's init process.
CMD ["/sbin/my_init"]