-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
40 lines (26 loc) · 1.03 KB
/
Dockerfile
File metadata and controls
40 lines (26 loc) · 1.03 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
FROM ruby:2.7.5-slim AS base
ARG BUNDLE_WITHOUT="test:development"
ENV BUNDLE_WITHOUT="${BUNDLE_WITHOUT}"
RUN apt-get update && \
apt-get install -y --no-install-recommends \
build-essential \
nodejs && \
apt-get autoremove -y && \
rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY Gemfile Gemfile.lock ./
RUN BUNDLER_VERSION=$(grep -A 1 "BUNDLED WITH" Gemfile.lock | tail -1 | tr -d ' ') && \
gem install bundler -v "$BUNDLER_VERSION"
RUN bundle install
COPY . .
CMD ["bundle", "exec", "middleman", "server", "--watcher-force-polling"]
FROM base AS build
ARG BUNDLE_WITHOUT="test:development"
ENV BUNDLE_WITHOUT="${BUNDLE_WITHOUT}"
RUN ./configure.sh r46 && bundle exec middleman build && mv build /opt/rees46
RUN ./configure.sh kameleoon && bundle exec middleman build && mv build /opt/kameleoon
RUN ./configure.sh pc && bundle exec middleman build && mv build /opt/personaclick
FROM nginx:1 AS prod
ENV CLIENT=rees46
COPY --from=build /opt /usr/share/nginx/html
COPY ./config/nginx.conf /etc/nginx/templates/default.conf.template