Something went wrong. Try again.
a pds written in elixir tempest.desertthunder.dev
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354# syntax=docker/dockerfile:1# Build from the project root:# docker build -f conf/Dockerfile -t tempest:local .
ARG ELIXIR_VERSION=1.18.4ARG OTP_VERSION=27.3.4ARG ALPINE_VERSION=3.21.7
FROM hexpm/elixir:${ELIXIR_VERSION}-erlang-${OTP_VERSION}-alpine-${ALPINE_VERSION} AS build
RUN apk add --no-cache build-base git npm python3 sqlite-dev
WORKDIR /appENV MIX_ENV=prod
RUN mix local.hex --force && mix local.rebar --force
COPY mix.exs mix.lock ./COPY config ./configRUN mix deps.get --only prod && mix deps.compile
COPY assets ./assetsCOPY CHANGELOG.md ./COPY docs ./docsCOPY lib ./libCOPY priv ./priv
RUN mix compileRUN mix assets.deployRUN mix release
FROM alpine:${ALPINE_VERSION} AS runtime
RUN apk add --no-cache ca-certificates libgcc libstdc++ ncurses-libs openssl sqlite-libs su-exec \ && addgroup -S tempest \ && adduser -S -G tempest -h /app tempest \ && mkdir -p /var/lib/tempest \ && chown -R tempest:tempest /var/lib/tempest
WORKDIR /appENV HOME=/app \ MIX_ENV=prod \ PHX_SERVER=true \ PORT=4000 \ TEMPEST_DATA_DIR=/var/lib/tempest
COPY --from=build --chown=tempest:tempest /app/_build/prod/rel/tempest ./COPY --chown=tempest:tempest conf/docker-entrypoint.sh /app/bin/docker-entrypointRUN chmod +x /app/bin/docker-entrypoint
EXPOSE 4000ENTRYPOINT ["/app/bin/docker-entrypoint"]CMD ["start"]