forked from bigbluebutton/greenlight
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
41 lines (29 loc) · 1.15 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
38
39
40
41
FROM ruby:2.5
# Install app dependencies.
RUN apt-get update -qq && apt-get install -y build-essential libpq-dev curl
ADD https://dl.yarnpkg.com/debian/pubkey.gpg /tmp/yarn-pubkey.gpg
RUN apt-key add /tmp/yarn-pubkey.gpg && rm /tmp/yarn-pubkey.gpg && \
echo 'deb http://dl.yarnpkg.com/debian/ stable main' > /etc/apt/sources.list.d/yarn.list && \
curl -sL https://deb.nodesource.com/setup_10.x | bash - && \
apt-get update && apt-get install -y nodejs yarn
# Set an environment variable for the install location.
ENV RAILS_ROOT /usr/src/app
# Make the directory and set as working.
RUN mkdir -p $RAILS_ROOT
WORKDIR $RAILS_ROOT
# Set Rails environment.
ENV RAILS_ENV production
COPY Gemfile* ./
RUN bundle install --without development test --deployment --clean
# Adding project files.
COPY . .
# Precompile assets
#RUN SECRET_KEY_BASE="$(bundle exec rake secret)" bundle exec rake assets:clean
RUN SECRET_KEY_BASE="$(bundle exec rake secret)" bundle exec rake assets:precompile
# Expose port 80.
EXPOSE 80
# Sets the footer of greenlight application with current build version
ARG version_code
ENV VERSION_CODE=$version_code
# Start the application.
CMD ["bin/start"]