-
Notifications
You must be signed in to change notification settings - Fork 103
/
Copy pathDockerfile.prod
34 lines (27 loc) · 1.18 KB
/
Dockerfile.prod
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
FROM node:10.20.1 AS build-dep
WORKDIR /srv/app
COPY package.json yarn.lock ./
RUN yarn install --production=true
FROM ruby:2.5.8-stretch
MAINTAINER OpenSource Connections <[email protected]>
# Must have packages
RUN apt-get update -qq && apt-get install -y vim curl git tmux apt-transport-https ca-certificates
# Install Node
RUN curl -sL https://deb.nodesource.com/setup_10.x | bash
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
RUN apt-get update && apt-get install -y nodejs yarn \
&& apt-get install -y --no-install-recommends \
ca-certificates \
bzip2 \
libfontconfig \
&& apt-get clean all \
&& rm -rf /var/lib/apt/lists/*
# Install dependencies
WORKDIR /srv/app
COPY Gemfile Gemfile.lock ./
RUN bundle install
COPY --from=build-dep /srv/app/node_modules ./node_modules/
COPY . .
RUN RAILS_ENV=production SECRET_KEY_BASE=fake_out_devise bundle exec rake assets:precompile DB_ADAPTER=mysql2
CMD foreman s -f Procfile