-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
48 lines (37 loc) · 1.18 KB
/
Dockerfile
File metadata and controls
48 lines (37 loc) · 1.18 KB
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
FROM ruby:2.5.1
MAINTAINER Jose Angel Parreño <joseangel.parreno@vizzuality.com>
ENV NAME=cw-india
ENV RAKE_ENV=production
ENV RAILS_ENV=production
ENV CW_API_URL="https://www.climatewatchdata.org/api/v1"
ENV ESP_API_URL="https://data.emissionspathways.org/api/v1"
ENV API_URL="/api/v1"
ENV S3_BUCKET_NAME="wri-sites"
ENV COUNTRY_ISO=IND
ENV GOOGLE_ANALYTICS_ID "UA-130931064-3"
# Install dependencies
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
postgresql-client \
&& rm -rf /var/lib/apt/lists/* \
&& curl -sL https://deb.nodesource.com/setup_8.x | bash - \
&& apt-get install -y nodejs build-essential patch zlib1g-dev liblzma-dev libicu-dev \
&& npm install -g yarn
RUN gem install bundler --no-ri --no-rdoc
# Create app directory
RUN mkdir -p /usr/src/$NAME
WORKDIR /usr/src/$NAME
# VOLUME /usr/src/$NAME
# Install app dependencies
COPY Gemfile Gemfile.lock ./
RUN bundle install --without development test --jobs 4 --deployment
# Env variables
ARG secretKey
ENV SECRET_KEY_BASE $secretKey
# Bundle app source
COPY . ./
EXPOSE 3000
# Rails assets compile
RUN bundle exec rake assets:precompile
# Start app
ENTRYPOINT ["./entrypoint.sh"]