Skip to content

Instantly share code, notes, and snippets.

View gaynetdinov's full-sized avatar

Damir Gainetdinov gaynetdinov

  • Zendesk
  • Berlin, Germany
View GitHub Profile
@gaynetdinov
gaynetdinov / migrate.sh
Last active June 16, 2017 06:34 — forked from ericentin/migrate.sh
How to run Ecto migrations from an exrm release
$./bin/my_app rpc Elixir.Application app_dir "[my_app, <<\"/priv/repo/migrations\">>]."
<<"/home/dashboard/uss/lib/my_app-0.0.1/priv/repo/migrations">>
./bin/my_app rpc Elixir.Ecto.Migrator run "['Elixir.MyApp.Repo', <<\"/home/dashboard/uss/lib/my_app-0.0.1/priv/repo/migrations\">>, up, [{all, true}]]."
# => []
defp check_access(conn) do
parsed_body = with {:ok, response} <- HTTPoison.get(url, header_with_authorization(conn)),
200 <- response.status_code,
do: Poison.Parser.parse(response.body)
case parsed_body do
{:ok, %{"super_admin" => _} = body} ->
{:ok, body}
_ ->
{:error, "User not authorized"}
Provider (relup) failed with: {error,
{rlx_prv_relup,
{relup_script_generation_error,
systools_relup,
{file_problem,
{"/home/dashboard/elixir-builds/user_settings_service/rel/user_settings_service/lib/elixir-1.3.2/ebin/elixir.appup",
{error,
{open,
"/home/dashboard/elixir-builds/user_settings_service/rel/user_settings_service/lib/elixir-1.3.2/ebin/elixir.appup",
enoent}}}}}}}