-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
46 lines (35 loc) · 1.36 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
46
FROM ruby:3.3.0-alpine
RUN apk -U upgrade && \
apk add --update --no-cache gcc git libc6-compat libc-dev make nodejs \
postgresql13-dev tzdata yarn g++
RUN echo "Europe/London" > /etc/timezone && \
cp /usr/share/zoneinfo/Europe/London /etc/localtime
ENV GOVUK_NOTIFY_API_KEY=TestKey \
HOSTING_DOMAIN=https://required-but-not-used \
LANG=en_GB.UTF-8 \
RAILS_ENV=production \
RAILS_SERVE_STATIC_FILES=yes \
REDIS_URL=redis://required-but-not-used \
SECRET_KEY_BASE=TestKey \
ZENDESK_TOKEN=TestToken \
ZENDESK_URL=https://required-but-not-used \
ZENDESK_USER=TestUser \
IDENTITY_SHARED_SECRET_KEY=testkey \
IDENTITY_API_URL=http://localhost \
IDENTITY_API_KEY=TestKey
WORKDIR /app
COPY Gemfile Gemfile.lock ./
RUN gem update --system && \
bundler -v && \
bundle config set no-cache 'true' && \
bundle config set no-binstubs 'true' && \
bundle install --retry=5 --jobs=4 --without=development && \
rm -rf /usr/local/bundle/cache
COPY package.json yarn.lock ./
RUN yarn install --frozen-lockfile --check-files
COPY . .
RUN bundle exec rails assets:precompile && \
rm -rf tmp/* log/* node_modules /tmp/*
CMD bundle exec rails db:migrate:ignore_concurrent_migration_exceptions && \
bundle exec rails data:migrate:ignore_concurrent_migration_exceptions && \
bundle exec rails server -b 0.0.0.0