Skip to content

Instantly share code, notes, and snippets.

@eitoball
Last active February 15, 2017 06:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eitoball/d9da18e1197405dea37d4011ea0e0289 to your computer and use it in GitHub Desktop.
Save eitoball/d9da18e1197405dea37d4011ea0e0289 to your computer and use it in GitHub Desktop.

Heroku に Phoenix アプリをアップ

See http://www.phoenixframework.org/docs/heroku

Heroku の準備

Heroku のアカウントを作成しよう

Heroku Toolbelt をインストールしよう

Heroku にコマンドラインでログインし、SSH キーを設定しよう

アプリの準備

バージョン管理システム

アプリのデプロイ

アプリのcreate

$ heroku create --buildpack "https://github.com/HashNuke/heroku-buildpack-elixir.git"
$ heroku buildpacks:add https://github.com/gjaldon/heroku-buildpack-phoenix-static.git

コードをpush

$ heroku git:remote -a [app-name]

config/prod.exs config/prod.secret.exs Procfile

MIX_ENV=prod mix phoenix.server

データベースのマイグレート

$ heroku run "POOL_SIZE=2 mix ecto.migrate"

おわりに

Ephemeral ファイルシステム

Ephemeral ストレージの回避策

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment