-
Notifications
You must be signed in to change notification settings - Fork 284
/
Copy pathDockerfile
45 lines (29 loc) · 1.26 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
FROM ruby:2.4
LABEL maintainer Travis CI GmbH <support+travis-web-docker-images@travis-ci.com>
RUN groupadd --gid 1000 node \
&& useradd --uid 1000 --gid node --shell /bin/bash --create-home node
ENV NPM_CONFIG_LOGLEVEL info
ENV NODE_VERSION 10.7.0
RUN curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-x64.tar.xz" \
&& tar -xJf "node-v$NODE_VERSION-linux-x64.tar.xz" -C /usr/local --strip-components=1 \
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs
ENV YARN_VERSION 0.22.0
RUN curl -fSL -o yarn.js "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-legacy-$YARN_VERSION.js" \
&& mv yarn.js /usr/local/bin/yarn \
&& chmod +x /usr/local/bin/yarn
# throw errors if Gemfile has been modified since Gemfile.lock
RUN bundle config --global frozen 1
RUN mkdir -p /app
WORKDIR /app
COPY Gemfile /app
COPY Gemfile.lock /app
COPY waiter /app/waiter
RUN bundle install --without assets development test
COPY package.json /app
COPY package-lock.json /app
RUN npm install --silent -g ember-cli
COPY . /app
RUN npm ci --silent
RUN ember build --environment=production
RUN cp -a public/* dist/
CMD bundle exec puma -I lib -p ${PORT:-4000} -t ${PUMA_MIN_THREADS:-8}:${PUMA_MAX_THREADS:-12} -w ${PUMA_WORKERS:-2} --preload waiter/config.ru