From 0147b608406fdec0bc962d3a9421c65df42bd924 Mon Sep 17 00:00:00 2001 From: Kieran Eglin Date: Tue, 26 Mar 2024 08:29:46 -0700 Subject: [PATCH] Exposes port on built image --- selfhosted.Dockerfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/selfhosted.Dockerfile b/selfhosted.Dockerfile index 5f7f128..d861cd0 100644 --- a/selfhosted.Dockerfile +++ b/selfhosted.Dockerfile @@ -75,6 +75,8 @@ RUN mix release # the compiled release and other runtime necessities FROM ${RUNNER_IMAGE} +ARG PORT=8945 + RUN apt-get update -y RUN apt-get install -y libstdc++6 openssl libncurses5 locales ca-certificates \ ffmpeg curl git openssh-client nano @@ -101,8 +103,9 @@ RUN chown nobody /config /downloads # set runner ENV ENV MIX_ENV="prod" -ENV PORT=8945 +ENV PORT=${PORT} ENV RUN_CONTEXT="selfhosted" +EXPOSE ${PORT} # Only copy the final release from the build stage COPY --from=builder --chown=nobody:root /app/_build/${MIX_ENV}/rel/pinchflat ./