LoginSignup
5
1

More than 3 years have passed since last update.

elixir v1.9ではdetachedオプションは非推奨になる

Posted at

phoenixをdaemon化させるときに、公式ドキュメント記載の

MIX_ENV=prod PORT=4001 elixir --detached -S mix do compile, phx.server

これ実行すると思いますが、elixirのバージョンあげると、警告が出るようになる。

[twintaro@phoenix hello]MIX_ENV=dev PORT=4001 elixir --detached -S mix do compile, phx.server
warning: the --detached option is deprecated

公式ドキュメント確認すると、確かに記載あり
https://hexdocs.pm/elixir/master/compatibility-and-deprecations.html

v1.9    --detached in CLI   --erl "-detached" (v1.0)

バージョン1.9以降は--erlの方を使いなさいよ、と。
なので、今後はこうする

MIX_ENV=prod PORT=4001 elixir --erl "-detached" -S mix do compile, phx.server

実行すると、警告は消えましたという話でした。

参考
https://hexdocs.pm/phoenix/deployment.html#starting-your-server-in-production
https://hexdocs.pm/elixir/master/compatibility-and-deprecations.html

5
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
1