Adds dockerfile

This commit is contained in:
benbot 2023-10-27 03:49:10 -04:00
parent b8ecd1201e
commit 58dd7e4fe0

View file

@ -48,10 +48,10 @@ RUN mix do compile, phx.digest
RUN mix release
# ---- Application Stage ----
FROM debian:buster-slim AS app
FROM elixir:1.15.6-slim AS app
# Install runtime dependencies
RUN apt-get update && apt-get install -y openssl libsqlite3-0 && apt-get clean
RUN apt-get update && apt-get install -y openssl libssl-dev libsqlite3-0 && apt-get clean
# Create and switch to the app user
RUN useradd --create-home app
@ -60,7 +60,6 @@ WORKDIR /home/app
# Copy over the build artifact from the previous step and create a symlink
COPY --from=app-build --chown=app:app /app/_build/prod/rel/ezcontainer_railway ./
RUN ln -s /home/app/_build/prod/rel/ezcontainer_railway/bin/ezcontainer_railway /home/app/bin/app
# Specify the entry point
ENTRYPOINT ["bin/app", "start"]
#ENTRYPOINT ["/home/app/bin/ezcontainer_railway", "start"]