forked from broadinstitute/single_cell_portal_core
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
23 lines (19 loc) · 860 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
# use KDUX base Rails image, configure only project-specific items here
FROM broadinstitute/kdux-rails-baseimage:1.0
# Set ruby version
RUN bash -lc 'rvm --default use ruby-2.3.6'
# Set up project dir, install gems, set up script to migrate database and precompile static assets on run
RUN mkdir /home/app/webapp
COPY Gemfile /home/app/webapp/Gemfile
COPY Gemfile.lock /home/app/webapp/Gemfile.lock
WORKDIR /home/app/webapp
RUN bundle install
COPY set_user_permissions.bash /etc/my_init.d/01_set_user_permissions.bash
COPY rails_startup.bash /etc/my_init.d/02_rails_startup.bash
# Configure NGINX
RUN rm /etc/nginx/sites-enabled/default
COPY webapp.conf /etc/nginx/sites-enabled/webapp.conf
COPY nginx.conf /etc/nginx/nginx.conf
RUN rm -f /etc/service/nginx/down
# Compile native support for passenger for Ruby 2.2
RUN passenger-config build-native-support