Mutli-stage build for production

This commit is contained in:
prichier
2020-10-22 15:19:01 +02:00
parent e945f48665
commit 1acff2dd8a
8 changed files with 167 additions and 172 deletions

11
lib/mobilizon/cli.ex Normal file
View File

@@ -0,0 +1,11 @@
defmodule Mobilizon.Cli do
@app :mobilizon
def migrate do
Application.load(@app)
for repo <- Application.fetch_env!(@app, :ecto_repos) do
{:ok, _, _} = Ecto.Migrator.with_repo(repo, &Ecto.Migrator.run(&1, :up, all: true))
end
end
end