working on redundancy

This commit is contained in:
2026-03-06 16:37:31 -07:00
parent 8059048db2
commit 181c6ca84b
16 changed files with 282 additions and 29 deletions

38
Dockerfile Normal file
View File

@@ -0,0 +1,38 @@
# ---- Build stage ----
FROM elixir:1.19.5-otp-28-alpine AS build
RUN apk add --no-cache build-base git nodejs npm
WORKDIR /app
ENV MIX_ENV=prod
RUN mix local.hex --force && mix local.rebar --force
COPY mix.exs mix.lock ./
RUN mix deps.get --only prod
RUN mix deps.compile
COPY config config
COPY priv priv
COPY lib lib
COPY assets assets
RUN mix assets.deploy
RUN mix release
# ---- Runtime stage ----
FROM elixir:1.19.5-otp-28-alpine AS runtime
RUN apk add --no-cache libstdc++ openssl ncurses-libs
WORKDIR /app
COPY --from=build /app/_build/prod/rel/elixir_ai ./
RUN touch .env
ENV PHX_SERVER=true
EXPOSE 4000
CMD ["bin/elixir_ai", "start"]