This repository has been archived on 2021-10-24. You can view files and clone it, but cannot push or open issues or pull requests.
greenlight/Dockerfile

35 lines
750 B
Docker
Raw Normal View History

2018-06-20 15:24:39 -04:00
FROM ruby:2.5
# Install app dependencies.
2018-07-05 17:25:59 -04:00
RUN apt-get update -qq && apt-get install -y build-essential libpq-dev nodejs
2018-06-20 15:24:39 -04:00
# Set an environment variable for the install location.
ENV RAILS_ROOT /usr/src/app
# Sets the footer of greenlight application with current build version
ARG version_code
ENV VERSION_CODE=$version_code
2018-06-20 15:24:39 -04:00
# Make the directory and set as working.
RUN mkdir -p $RAILS_ROOT
WORKDIR $RAILS_ROOT
# Set Rails environment.
2018-06-20 15:24:39 -04:00
ENV RAILS_ENV production
# Adding project files.
COPY . .
# Install gems.
RUN bundle install --without development test --deployment --clean
# Precompile assets.
RUN bundle exec rake assets:clean
RUN bundle exec rake assets:precompile
2018-07-05 17:25:59 -04:00
# Expose port 80.
EXPOSE 80
2018-06-20 15:24:39 -04:00
# Start the application.
CMD ["bin/start"]