Skip to content

Commit

Permalink
Update to Elixir 1.8
Browse files Browse the repository at this point in the history
  • Loading branch information
gcauchon committed Mar 14, 2019
1 parent fa19fd6 commit 88c3b24
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 41 deletions.
5 changes: 4 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
_build/
.git/
.elixir_ls/
_build/
deps/
test/
priv/static/

.*
coveralls.json
docker-compose.yml
Makefile
CODE_OF_CONDUCT.md
README.md
15 changes: 1 addition & 14 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# App artifacts
/.elixir_ls
/_build
/db
/deps
Expand All @@ -7,29 +8,15 @@
# Generated on crash by the VM
erl_crash.dump

# Generated on crash by NPM
npm-debug.log

# Static artifacts
/assets/node_modules

# Since we are building assets from assets/,
# we ignore priv/static. You may want to comment
# this depending on your deployment strategy.
/priv/static/

# Files matching config/*.secret.exs pattern contain sensitive
# data and you should not commit them into version control.
#
# Alternatively, you may comment the line below and commit the
# secrets files as long as you replace their contents by environment
# variables.
/config/*.secret.exs

# Dialyzer plts are stored in the repo to allow CI to cache the files
/priv/plts/*.plt
/priv/plts/*.plt.hash

# Local environment variable files
.env.local
.env.*.local
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# Step 1 - build the OTP binary
#
FROM elixir:1.7.4-alpine AS builder
FROM elixir:1.8.1-alpine AS builder

ARG APP_NAME
ARG APP_VERSION
Expand All @@ -16,7 +16,7 @@ WORKDIR /build
# This step installs all the build tools we'll need
RUN apk update && \
apk upgrade --no-cache && \
apk add --no-cache git build-base python
apk add --no-cache make git openssl-dev python
RUN mix local.rebar --force && \
mix local.hex --force

Expand All @@ -38,15 +38,15 @@ RUN cd /opt/build && \
#
# Step 2 - build a lean runtime container
#
FROM alpine:3.8
FROM alpine:3.9

ARG APP_NAME
ENV APP_NAME=${APP_NAME}

# Update kernel and install runtime dependencies
RUN apk --no-cache update && \
apk --no-cache upgrade && \
apk --no-cache add bash openssl ca-certificates erlang-crypto
apk --no-cache add bash openssl erlang-crypto

WORKDIR /opt/dispatch

Expand Down
1 change: 0 additions & 1 deletion Procfile

This file was deleted.

11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,10 +171,9 @@ The most common reasons as to why there was fewer requested reviews that usual (

## 🚀 Deploy

### Heroku
The application can be deployed on Heroku following the [Container Registry & Runtime](https://devcenter.heroku.com/articles/container-registry-and-runtime) guide.

The application can be deployed on Heroku using the [`heroku-buildpack-elixir`](https://github.com/HashNuke/heroku-buildpack-elixir.git) buildpack.

### OTP release

An _OTP release_ can be created with `make build`.
1. Create a docker image for the _OTP release_ `make build DOCKER_IMAGE_TAG=latest`
2. Tag the image for Heroky’s registry `docker tag dispatch:latest registry.heroku.com/dispatch/web`
3. Push the image to the registry `docker push registry.heroku.com/dispatch/web`
4. Release the image `heroku container:release web`
8 changes: 0 additions & 8 deletions elixir_buildpack.config

This file was deleted.

14 changes: 7 additions & 7 deletions mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,6 @@ defmodule Dispatch.Mixfile do
# Errors
{:sentry, "~> 6.2"},

# Linting
{:credo, "~> 1.0.0", only: [:dev, :test]},
{:credo_envvar, "~> 0.1.0", only: ~w(dev test)a, runtime: false},

# Date/time management
{:timex, "~> 3.1"},

Expand All @@ -63,12 +59,16 @@ defmodule Dispatch.Mixfile do
# OTP Release
{:distillery, "~> 2.0"},

# Test coverage
{:excoveralls, "~> 0.10", only: :test},
# Linting
{:credo, "~> 1.0.0", only: ~w(dev test)a, runtime: false},
{:credo_envvar, "~> 0.1.0", only: ~w(dev test)a, runtime: false},

# Test
{:mock, "~> 0.2.0", only: :test},
{:mox, "~> 0.4.0", only: :test}
{:mox, "~> 0.4.0", only: :test},

# Test coverage
{:excoveralls, "~> 0.10", only: :test}
]
end

Expand Down

0 comments on commit 88c3b24

Please sign in to comment.