-
-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathDockerfile.full
More file actions
67 lines (43 loc) · 1.71 KB
/
Dockerfile.full
File metadata and controls
67 lines (43 loc) · 1.71 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
FROM node:22.16.0 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 /app
RUN npm ci
RUN npm run build
FROM node:22.16.0 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 /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 . .
RUN rm -rf deps
RUN mix do clean, deps.get
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.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"]