forked from quran/quran.com-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
41 lines (30 loc) · 877 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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
FROM ruby:2.3.3
RUN apt-get update -qq && \
apt-get install -y \
build-essential \
libpq-dev \
nodejs \
rsync && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY / /app/
# files could be mounted in dev for realtime code changes without rebuild
# typically that would be: .:/app
RUN mkdir /var/www && \
chown -R www-data /app /var/www /usr/local/bundle
USER www-data
# install a matching bundler to Gemfile.lock
RUN gem install bundler -v 1.15.3
# install all gems
ARG env=development
ARG bundle_opts=
ENV RAILS_ENV $env
ENV RACK_ENV $env
RUN echo "Running \"bundle install $bundle_opts\" with environment set to \"$env\"..." && \
bundle install $bundle_opts
# generate sitemap
RUN bundle exec sitemap:refresh:no_ping
EXPOSE 3000
ENTRYPOINT ["bundle", "exec"]
CMD ["puma", "-C", "config/puma.rb"]