-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
Dockerfile.full
51 lines (34 loc) · 1.3 KB
/
Dockerfile.full
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
47
48
49
50
51
FROM node:17.4.0 AS assets
# For packages not compatible with OpenSSL 3.0 https://nodejs.org/en/blog/release/v17.0.0/
ENV NODE_OPTIONS=--openssl-legacy-provider
WORKDIR /app
COPY ./apps/boruta_admin/assets /app
RUN npm ci
RUN npm run build
FROM elixir:1.14-otp-25-alpine AS builder
RUN apk --no-cache --update add build-base git
ENV MIX_ENV=prod
RUN mix local.hex --force
RUN mix local.rebar --force
WORKDIR /app
COPY . .
COPY --from=assets /priv ./apps/boruta_admin/priv/
RUN rm -rf deps
RUN mix do clean, deps.get
RUN mix compile
WORKDIR /app/apps/boruta_admin
RUN mix phx.digest
WORKDIR /app/apps/boruta_identity
RUN mix phx.digest
WORKDIR /app/apps/boruta_web
RUN mix phx.digest
WORKDIR /app
RUN mix release boruta --force --overwrite
FROM elixir:1.14-otp-25-alpine
WORKDIR /app
COPY --from=builder /app/_build/prod/rel/boruta ./
# File used for gateway static configuration, used in combination with `BORUTA_GATEWAY_CONFIGURATION_PATH` environment variable
COPY /static_config/example-gateway-configuration.yml config/example-gateway-configuration.yml
COPY /static_config/example-httpbin-configuration.yml config/example-httpbin-configuration.yml
COPY /static_config/example-protected-httpbin-configuration.yml config/example-protected-httpbin-configuration.yml
CMD ["/bin/sh", "-c", "/app/bin/boruta start"]