poex/Dockerfile

26 lines
510 B
Docker

# Use an official Elixir runtime as a parent image.
FROM elixir:latest
RUN apt-get update && \
apt-get install -y postgresql-client inotify-tools nodejs npm
# Create app directory and copy the Elixir projects into it.
RUN mkdir /app
COPY . /app
WORKDIR /app
# Install Hex package manager.
RUN mix local.hex --force
# Compile the project.
RUN mix deps.get
WORKDIR /app/assets
RUN npm install --verbose
WORKDIR /app
RUN mix assets.setup
RUN mix assets.build
RUN mix do compile
CMD ["/app/entrypoint.sh"]