forked from MeasureAuthoringTool/bonnie
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
27 lines (20 loc) · 943 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
FROM phusion/passenger-full:2.5.1
ARG PASSENGER_APP_ENV=production
ENV RAILS_ENV=${PASSENGER_APP_ENV}
ENV RUBY_VERSION=2.7.2
ADD bonnie.conf /etc/nginx/sites-enabled/bonnie.conf
COPY --chown=app:app . /home/app/bonnie
RUN bash -lc "rvm install ruby-${RUBY_VERSION} && rvm --default use ruby-${RUBY_VERSION}"
RUN rm -f /etc/service/nginx/down \
&& rm -f /etc/nginx/sites-enabled/default \
&& apt update \
&& curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
&& apt-get install -y nodejs \
&& npm install -g npm@latest \
&& apt-get install shared-mime-info -y
RUN su - app -c "cd /home/app/bonnie \
&& curl -O https://s3.amazonaws.com/rds-downloads/rds-combined-ca-bundle.pem \
&& gem install bundler -v 2.1.4 \
&& bundle install \
&& npm install \
&& RAILS_ENV=${PASSENGER_APP_ENV} bundle exec rake assets:precompile"