Skip to content

Instantly share code, notes, and snippets.

@chakrihacker
Forked from emilsoman/phoenix_to_umbrella
Created October 3, 2021 07:44
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 chakrihacker/af5d77b048ae57429e444381504b25c4 to your computer and use it in GitHub Desktop.
Save chakrihacker/af5d77b048ae57429e444381504b25c4 to your computer and use it in GitHub Desktop.
How to move an existing phoenix app under an umbrella app
How to convert existing phoenix app to an umbrella app.
https://elixir-lang.slack.com/archives/phoenix/p1472921051000134
chrismccord [10:14 PM]
@alanpeabody yes, it's straightforward
[10:14]
1) mix new my_umbrella --umbrella
[10:14]
2) cd my_umbrella/apps
[10:15]
3) mv ~/path/to/phoenix_app ./
[10:16]
4) Update the paths in your phoenix project's mix.exs to match:
david.antaramian [10:16 PM]
He described his problem more in #general which is that he wants to keep his existing git history. Though, that should really just involve inverting what you suggested
chrismccord [10:16 PM]
```
def project do
[app: :my_app,
version: "0.0.1",
build_path: "../../_build",
config_path: "../../config/config.exs",
deps_path: "../../deps",
lockfile: "../../mix.lock",
elixir: "~> 1.2",
elixirc_paths: elixirc_paths(Mix.env),
compilers: [:phoenix, :gettext] ++ Mix.compilers,
build_embedded: Mix.env == :prod,
start_permanent: Mix.env == :prod,
aliases: aliases,
deps: deps]
end
```
[10:16]
5) shipit
[10:17]
6) if using brunch/node, update package.json paths that reference phoenix
[10:18]
@david.antaramian @alanpeabody ah yes, you should be able to do it similarly but within the existing repo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment