-
Notifications
You must be signed in to change notification settings - Fork 6
/
Dockerfile
50 lines (42 loc) · 1.49 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
42
43
44
45
46
47
48
49
50
FROM ruby:2.3.0
MAINTAINER [email protected]
# the essentials
RUN apt-get update -qq && apt-get install -y build-essential
# for postgres
RUN apt-get install -y libpq-dev
# for nokogiri
RUN apt-get install -y libxml2-dev libxslt1-dev
# for capybara-webkit
RUN apt-get install -y libqt4-webkit libqt4-dev xvfb
# for a JS runtime
RUN apt-get install -y nodejs
# Heroku toolbelt
RUN apt-get install -y sudo curl openssh-client git
RUN curl https://toolbelt.heroku.com/install.sh | sh
ENV PATH $PATH:/usr/local/heroku/bin
# support for `rgeo` gem (for cartographic calculations)
RUN apt-get install -y libgdal-dev
RUN apt-get install -y libgeos-dev
RUN apt-get install -y libproj-dev
# RUN ruby-geos # might not need this
# Configure the main working directory. This is the base
# directory used in any further RUN, COPY, and ENTRYPOINT
# commands.
RUN mkdir -p /inspector-gadget
WORKDIR /inspector-gadget
# Define our entrypoint. docker-entry.sh ensures that
# one one instance of our rails app is running.
COPY docker-entry.sh ./
ENTRYPOINT ["./docker-entry.sh"]
# Copy the Gemfile as well as the Gemfile.lock and install
# the RubyGems. This is a separate step so the dependencies
# will be cached unless changes to one of those two files
# are made.
COPY Gemfile Gemfile.lock ./
RUN gem install bundler && bundle install
# Copy the main application.
COPY . ./
# Precompile Rails assets
RUN bundle exec rake assets:precompile
# CMD must be present or Heroku deploy will fail
CMD bundle exec puma -C config/puma.rb