I made an umbrella project json_media
.
(GitHub - nallwhy/json-media: Personal media project)
And I’m going to create multiple elixir apps and want to include those apps to json-media
app.
I succeeded to make another phoenix project my_app_web
in json_media
umbrella, and run it in json_media_web
app.
- Add to deps
{:my_app_web, in_umbrella: true}
- Add
server: false
option to config ofMyAppWeb.Endpoint
- Add forwarding to
MyAppWeb.Endpoint
in router ofjson_media_web
forward "/my_app", MyAppWeb.Endpoint
So I thought that I can make another ‘umbrella’ app my_app
in private GitHub repo and include that in json_media_web
.
(my_app
umbrella includes my_app
and my_app_web
app)
But when I do that and run mix deps.get
, it fails.
def deps() do
[
...,
{:my_app, git: "https://github.com/nallwhy/my_app.git"}
]
end
** (Mix) App my_app lists itself as a dependency
So, I renamed my_app
to my_app_umbrella
in deps/0
. Then I succeeded to add my_app_umbrella
to deps and run mix deps.get
.
def deps() do
[
...,
{:my_app_umbrella, git: "https://github.com/nallwhy/my_app.git"}
]
end
But when I run mix phx.server
, it fails.
** (Mix) Could not start application my_app_umbrella: could not find application file: my_app_umbrella.app
I think it can be succeeded if I can add only my_app_web
to deps not whole my_app_umbrella
.
Do you have any idea?