-
-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathDockerfile.full
More file actions
77 lines (51 loc) · 2.15 KB
/
Copy pathDockerfile.full
File metadata and controls
77 lines (51 loc) · 2.15 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
FROM node:25.2.1 AS admin_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/package*.json ./
RUN npm ci
COPY ./apps/boruta_admin/assets /app
RUN npm run build
FROM node:25.2.1 AS identity_assets
ARG BORUTA_OAUTH_BASE_URL
# 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/wallet
COPY ./apps/boruta_identity/assets/wallet/package*.json ./
RUN npm ci
COPY ./apps/boruta_identity/assets/wallet /app/wallet
RUN npm run build
FROM elixir:1.20-otp-29-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 mix.exs mix.lock ./
COPY apps/boruta_auth/mix.exs apps/boruta_auth/mix.exs
COPY apps/boruta_admin/mix.exs apps/boruta_admin/mix.exs
COPY apps/boruta_gateway/mix.exs apps/boruta_gateway/mix.exs
COPY apps/boruta_identity/mix.exs apps/boruta_identity/mix.exs
COPY apps/boruta_web/mix.exs apps/boruta_web/mix.exs
RUN mix deps.get
COPY . .
RUN mix compile
COPY --from=admin_assets /priv/static/assets ./apps/boruta_admin/priv/static/assets
COPY --from=identity_assets /priv/static/wallet ./apps/boruta_identity/priv/static/wallet
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.20-otp-29-alpine
RUN apk --no-cache --update add openssl
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"]