remove sample dockerfile & entrypoint as they're now included in the repo

This commit is contained in:
Adam Piontek 2022-08-14 15:25:59 -04:00
parent 94637a564c
commit ba5957cc93

View file

@ -26,53 +26,3 @@ I'm using a dumb & simple docker approach to deploying this now. Nothing automat
``` ```
2. on server, build a new container, and run it 2. on server, build a new container, and run it
### Simple dockerfile
```dockerfile
# ./Dockerfile
# Extend from the official Elixir image
FROM elixir:1.13.4-otp-25-alpine
# # install the package postgresql-client to run pg_isready within entrypoint script
# RUN apt-get update && \
# apt-get install -y postgresql-client
# Copy the entrypoint script
COPY ./entrypoint.sh /entrypoint.sh
# Create app directory and copy the Elixir projects into it
RUN mkdir /app
COPY ./app /app
WORKDIR /app
# Install the build tools we'll need
RUN apk update && \
apk upgrade --no-cache && \
apk add --no-cache \
build-base && \
mix local.rebar --force && \
mix local.hex --force
# The environment to build with
ENV MIX_ENV=prod
# Get deps and compile
RUN mix do deps.get, deps.compile, compile
# Start command
CMD = ["/entrypoint.sh"]
```
### Simple entrypoint script
```shell
#!/bin/ash
export MIX_ENV="prod"
cd /app
exec mix ecto.migrate && mix phx.server
```