add touchless docker deploys

This commit is contained in:
2021-09-04 16:19:23 -04:00
committed by oliviasculley
parent bde1cff7a4
commit 3dc255b7c2
13 changed files with 476 additions and 7944 deletions

View File

@ -0,0 +1,18 @@
defmodule Lokal.Repo.Migrator do
use GenServer
require Logger
def start_link(_) do
GenServer.start_link(__MODULE__, [], [])
end
def init(_) do
migrate!()
{:ok, nil}
end
def migrate! do
path = Application.app_dir(:lokal, "priv/repo/migrations")
Ecto.Migrator.run(Lokal.Repo, path, :up, all: true)
end
end