简体   繁体   中英

Elixir: Building and deploying an umbrella app with edeliver

I have been building and deploying an elixir app to production with edeliver . I have now organized the application into an umbrella project and am getting stuck configuring edeliver to build the project.

My initial thoughts were that each app in the umbrella would need its own .deliver/config and I would have to build and deploy each application in the umbrella independently, which I was cool with. When I run mix edeliver build release in one of the apps, it starts the build process. However, it ends up creating a build for each of the applications on the build server.

Ultimately, it fails the process at the point where it needs to find the tar to download, with it complaining Please set RELEASE_VERSION=x . Each app has it's own release version in the mix file which was all that was required to set the release version for the build previously.

ls: cannot access /data/web/staging.my-app.com/build/rel/my-app/releases/*/: No such file or directory
Failed to detect generated release version at
deploy@192.168.0.1:/data/web/staging.my-app.com/build/rel/my-app/releases/

Please set RELEASE_VERSION=x
Detected several releases:

 FAILED
 2:
 ssh
basename: illegal option -- o
usage: basename string [suffix]
   basename [-a] [-s suffix] string [...]

 ConnectTimeout=3
 deploy@192.168.0.1
 ls
basename: illegal option -- A
usage: basename string [suffix]
       basename [-a] [-s suffix] string [...]

 *

Pointing the RELEASE_DIR to the correct directory for an umbrella app fixed this for me. Adding the apps folder after build is required because the apps have been moved into that folder.I have to ssh into the server and clear out the rel folder manually before each build. I'm pretty sure this could be fixed/automated by adding that to a before hook or configuring the GIT_CLEAN_PATHS correctly. I Also launch the umbrella build and deploy from the master application folder.

RELEASE_DIR="/my-app.com/build/apps/my_app/rel/my_app/"

BUILD_AT="/my-app.com/build"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM