forked from cerner/kaiju
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreview.Dockerfile
38 lines (26 loc) · 877 Bytes
/
review.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
# This docker container creates a non-persistent review app for heroku PR deployments.
FROM cerner/kaiju-ruby-node-redis-traefik:2.4.2-8.9.2-3.2-1.4.4
EXPOSE 80
# Prepare Directory for Source Code
RUN mkdir /app
WORKDIR /app
# Install Node Dependencies
COPY ["package.json", "package-lock.json", "Gemfile", "Gemfile.lock", "/app/"]
COPY ["client/package.json", "client/package-lock.json", "/app/client/"]
RUN npm install
RUN bundle install
COPY . /app
# Node Env
ENV NODE_ENV=production
# Rails Env
ENV RAILS_ENV production
ENV RAILS_SERVE_STATIC_FILES true
ENV KAIJU_ALLOW_NO_AUTH i_accept_the_risk_of_running_with_no_authentication
ENV REDIS_HOST localhost
ENV REDIS_PORT 6379
# Precompile Assets
RUN cd /app/ \
&& bundle exec rake assets:precompile
ENV SECRET_KEY_BASE $(export SECRET_KEY_BASE_TEMP=$(rails secret))
EXPOSE 9000
CMD nf start -j Procfile.review