{"action":"created","issue":{"url":"https://api.github.com/repos/bitwalker/distillery/issues/159","repository_url":"https://api.github.com/repos/bitwalker/distillery","labels_url":"https://api.github.com/repos/bitwalker/distillery/issues/159/labels{/name}","comments_url":"https://api.github.com/repos/bitwalker/distillery/issues/159/comments","events_url":"https://api.github.com/repos/bitwalker/distillery/issues/159/events","html_url":"https://github.com/bitwalker/distillery/issues/159","id":194312671,"number":159,"title":"A release name other than the app_name doesn't start all the applications","user":{"login":"minhajuddin","id":43916,"avatar_url":"https://avatars.githubusercontent.com/u/43916?v=3","gravatar_id":"","url":"https://api.github.com/users/minhajuddin","html_url":"https://github.com/minhajuddin","followers_url":"https://api.github.com/users/minhajuddin/followers","following_url":"https://api.github.com/users/minhajuddin/following{/other_user}","gists_url":"https://api.github.com/users/minhajuddin/gists{/gist_id}","starred_url":"https://api.github.com/users/minhajuddin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/minhajuddin/subscriptions","organizations_url":"https://api.github.com/users/minhajuddin/orgs","repos_url":"https://api.github.com/users/minhajuddin/repos","events_url":"https://api.github.com/users/minhajuddin/events{/privacy}","received_events_url":"https://api.github.com/users/minhajuddin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-12-08T11:31:01Z","updated_at":"2016-12-15T06:41:16Z","closed_at":null,"body":"### Steps to reproduce\r\n\r\nChange the `rel/config.exs` to\r\n\r\n```elixir\r\nuse Mix.Releases.Config,\r\n    # This sets the default release built by `mix release`\r\n    default_release: :\"foo_server_#{Mix.env}\",\r\n    # This sets the default environment used by `mix release`\r\n    default_environment: Mix.env\r\n# ...\r\nenvironment :staging do\r\n  set include_erts: true\r\n  set include_src: false\r\n  set cookie: :\"<snip>\"\r\nend\r\n\r\n# ...\r\n\r\nrelease :\"foo_server_#{Mix.env}\" do\r\n  set version: current_version(:foo_server)\r\nend\r\n```\r\nBuild the project using `MIX_ENV=staging mix release --verbose`\r\n\r\nNow, when I run `_build/staging/rel/foo_server_staging/bin/foo_server_staging foreground` it doesn't start the phoenix app or the other apps.\r\n\r\n### Verbose Logs\r\n```text\r\n==> Loading configuration..\r\n==> Assembling release..\r\n==> Building release foo_server_staging:0.1.1481192764 using environment staging\r\n==> One or more direct or transitive dependencies are missing from\r\n    :applications or :included_applications, they will not be included\r\n    in the release:\r\n\r\n    :calendar\r\n    :cowboy\r\n    :gettext\r\n    :foo_shared\r\n    :httpoison\r\n    :logger_file_backend\r\n    :mailer\r\n    :phoenix\r\n    :phoenix_ecto\r\n    :phoenix_html\r\n    :postgrex\r\n    :redix\r\n    :rollbax\r\n\r\n    This can cause your application to fail at runtime. If you are sure\r\n    that this is not an issue, you may ignore this warning.\r\n\r\n==> Discovered applications:\r\n  compiler-7.0.2\r\n    from: /usr/lib/erlang/lib/compiler-7.0.2\r\n    applications:\r\n      :kernel\r\n      :stdlib\r\n    includes: none\r\n\r\n  stdlib-3.1\r\n    from: /usr/lib/erlang/lib/stdlib-3.1\r\n    applications:\r\n      :kernel\r\n    includes: none\r\n\r\n  kernel-5.1\r\n    from: /usr/lib/erlang/lib/kernel-5.1\r\n    applications: none\r\n    includes: none\r\n\r\n  elixir-1.3.4\r\n    from: /usr/local/lib/elixir/bin/../lib/elixir\r\n    applications:\r\n      :kernel\r\n      :stdlib\r\n      :compiler\r\n    includes: none\r\n\r\n  iex-1.3.4\r\n    from: /usr/local/lib/elixir/bin/../lib/iex\r\n    applications:\r\n      :kernel\r\n      :stdlib\r\n      :elixir\r\n    includes: none\r\n\r\n  sasl-3.0.1\r\n    from: /usr/lib/erlang/lib/sasl-3.0.1\r\n    applications:\r\n      :kernel\r\n      :stdlib\r\n    includes: none\r\n\r\n==> Generated overlay vars:\r\n    release_name=:foo_server_staging\r\n    release_version=\"0.1.1481192764\"\r\n    is_upgrade=false\r\n    upgrade_from=:latest\r\n    dev_mode=false\r\n    include_erts=true\r\n    include_src=false\r\n    include_system_libs=true\r\n    erl_opts=\"\"\r\n    erts_vsn=\"8.1\"\r\n    output_dir=\"_build/staging/rel/foo_server_staging\"\r\n==> Copying applications to _build/staging/rel/foo_server_staging\r\n==> Generating nodetool\r\n==> Generating start_erl.data\r\n==> Generating vm.args\r\n==> Generating sys.config from config/config.exs\r\n==> Including ERTS 8.1 from /usr/lib/erlang/erts-8.1\r\n==> Generating boot script\r\n==> Generating RELEASES\r\n==> Generating start_clean.boot\r\n==> Applying overlays\r\n==> Applying mkdir overlay\r\n    dst: releases/0.1.1481192764/hooks\r\n==> Applying mkdir overlay\r\n    dst: releases/0.1.1481192764/hooks/pre_start.d\r\n==> Applying mkdir overlay\r\n    dst: releases/0.1.1481192764/hooks/post_start.d\r\n==> Applying mkdir overlay\r\n    dst: releases/0.1.1481192764/hooks/pre_stop.d\r\n==> Applying mkdir overlay\r\n    dst: releases/0.1.1481192764/hooks/post_stop.d\r\n==> Applying mkdir overlay\r\n    dst: releases/0.1.1481192764/hooks/pre_upgrade.d\r\n==> Applying mkdir overlay\r\n    dst: releases/0.1.1481192764/hooks/post_upgrade.d\r\n==> Applying mkdir overlay\r\n    dst: releases/0.1.1481192764/commands\r\n==> Packaging release..\r\n==> Archiving foo_server_staging-0.1.1481192764\r\n==> Writing tarball to _build/staging/rel/foo_server_staging/releases/0.1.1481192764/foo_server_staging.tar.gz\r\n==> Updating tarball\r\n==> Tarball updated!\r\n==> Release successfully built!\r\n    You can run it in one of the following ways:\r\n      Interactive: _build/staging/rel/foo_server_staging/bin/foo_server_staging console\r\n      Foreground: _build/staging/rel/foo_server_staging/bin/foo_server_staging foreground\r\n      Daemon: _build/staging/rel/foo_server_staging/bin/foo_server_staging start\r\n```\r\n\r\n### Description of issue\r\n\r\nI expected it to start all the appslications, However, it doesn't start any. Changing the release name to match the app_name makes it work\r\n\r\nI am using Elixir 1.3.4 on Erlang 19 and distillery 1.0. The app_name is `foo_server` whereas the release name is `foo_server_staging`. I need this as I'll be running a *staging* and *sandbox* environment on the same box.\r\n"},"comment":{"url":"https://api.github.com/repos/bitwalker/distillery/issues/comments/267251478","html_url":"https://github.com/bitwalker/distillery/issues/159#issuecomment-267251478","issue_url":"https://api.github.com/repos/bitwalker/distillery/issues/159","id":267251478,"user":{"login":"minhajuddin","id":43916,"avatar_url":"https://avatars.githubusercontent.com/u/43916?v=3","gravatar_id":"","url":"https://api.github.com/users/minhajuddin","html_url":"https://github.com/minhajuddin","followers_url":"https://api.github.com/users/minhajuddin/followers","following_url":"https://api.github.com/users/minhajuddin/following{/other_user}","gists_url":"https://api.github.com/users/minhajuddin/gists{/gist_id}","starred_url":"https://api.github.com/users/minhajuddin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/minhajuddin/subscriptions","organizations_url":"https://api.github.com/users/minhajuddin/orgs","repos_url":"https://api.github.com/users/minhajuddin/repos","events_url":"https://api.github.com/users/minhajuddin/events{/privacy}","received_events_url":"https://api.github.com/users/minhajuddin/received_events","type":"User","site_admin":false},"created_at":"2016-12-15T06:41:16Z","updated_at":"2016-12-15T06:41:16Z","body":"I was using releases to get multiple instances of the same app running on the same server. One for staging and one for sandbox. `epmd` complains if you try to start a second app with the same name on the same server. I thought a release was a good way to create different named nodes. Hence the problem.\r\n\r\nHowever, I've found a workaround using the `erl_opts` setting in the environments (which should have been obvious). My environment block is configured as:\r\n\r\n```elixir\r\n#...\r\nenvironment :staging do\r\n  set include_erts: true\r\n  set include_src: false\r\n  # set a node name so that epmd doesn't complain if two foo_servers are running on the same server\r\n  set erl_opts: \"-sname foo_server_staging\"\r\n  set cookie: :\"<snip>\"\r\nend\r\n\r\nenvironment :sandbox do\r\n  set include_erts: true\r\n  set include_src: false\r\n  # set a node name so that epmd doesn't complain if two foo_servers are running on the same server\r\n  set erl_opts: \"-sname foo_server_sandbox\"\r\n  set cookie: :\"<snip>\"\r\nend\r\n#...\r\n```\r\n"}}
{"actor":{"display_login":"minhajuddin"}}