-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathContainerfile
More file actions
39 lines (30 loc) · 985 Bytes
/
Copy pathContainerfile
File metadata and controls
39 lines (30 loc) · 985 Bytes
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
# SPDX-License-Identifier: MPL-2.0
#
# PanLL BEAM runtime on Chainguard.
# This builds the panll_beam OTP release and runs it on a Chainguard image.
ARG ELIXIR_BUILDER_IMAGE=docker.io/elixirlang/elixir:1.19-otp-26
ARG ELIXIR_RUNTIME_IMAGE=docker.io/elixirlang/elixir:1.19-otp-26
FROM ${ELIXIR_BUILDER_IMAGE} AS build
WORKDIR /workspace
ENV MIX_ENV=prod
COPY beam/panll_beam ./beam/panll_beam
WORKDIR /workspace/beam/panll_beam
RUN mix local.hex --force && \
mix local.rebar --force && \
mix deps.get --only prod && \
mix deps.compile && \
mix release
FROM ${ELIXIR_RUNTIME_IMAGE} AS runtime
WORKDIR /app
ENV MIX_ENV=prod
ENV PANLL_BEAM_APIS=http,graphql,grpc
ENV PANLL_BEAM_HTTP_PORT=4100
ENV PANLL_BEAM_GRAPHQL_PORT=4101
ENV PANLL_BEAM_GRPC_PORT=50051
ENV PANLL_BEAM_PORT=4100
COPY --from=build /workspace/beam/panll_beam/_build/prod/rel/panll_beam ./panll_beam
EXPOSE 4100
EXPOSE 4101
EXPOSE 50051
ENTRYPOINT ["/app/panll_beam/bin/panll_beam"]
CMD ["start"]