我们正尝试将edeliverPhoenix Web应用程序的"热升级"部署到远程虚拟机实例.
我们的目标是每次都构建应用程序的"升级"版本,以便应用程序可以在生产中"热"升级而无需任何停机时间.
我们成功地在"Hello World"凤凰应用程序上进行了"热升级":https: //github.com/nelsonic/hello_world_edeliver,当构建通过时,它会自动从Travis-CI部署.请参阅:https://travis-ci.org/nelsonic/hello_world_edeliver/builds/259965752#L1752
因此,理论上这种技术应该适用于我们的"真实"应用程序.
执行以下命令(构建升级):
mix edeliver build upgrade --auto-version=git-revision --from=$(git rev-parse HEAD~) --to=$(git rev-parse HEAD) --verbose
Run Code Online (Sandbox Code Playgroud)
即"构建从以前的git版本到当前版本的升级"
到现在为止还挺好." 发布成功! "

vm.args: No such file or directory当我们尝试部署升级时:
mix edeliver deploy upgrade to production --version=1.0.3+86d55eb --verbose
Run Code Online (Sandbox Code Playgroud)

cat: /home/hladmin/healthlocker/releases/1.0.3+86d55eb/vm.args: No such file or directory
Run Code Online (Sandbox Code Playgroud)
注意:我们有一个小的bash脚本,它读取可用的最新升级版本
.deliver/releases并进行部署,看看:version.sh
有没有办法忽略vm.args文件的缺失并继续部署?
或者,如果需要文件来完成部署,是否有一些关于如何创建文件的文档? …
我们正在尝试将我们的Phoenix Web App部署到Linux VM(在我们的Azure案例中)使用edeliver
我们已经使用Azure部署了一个"基本"博客应用程序,edeliver并记录了以下步骤:https:
//github.com/dwyl/learn-微软蔚蓝#部分2 -部署-您的应用程序
而当我们手动运行(" 实 ")的应用程序:https://github.com/nelsonic/healthlocker
使用上的实例MIX_ENV=prod mix phoenix.server运行良好!
当我们使用以下命令将应用程序部署并运行到Azure实例时:
mix edeliver build release --verbose
mix edeliver deploy release to production
mix edeliver start production
Run Code Online (Sandbox Code Playgroud)
我们收到一条肯定的确认消息:
EDELIVER HEALTHLOCKER WITH START COMMAND
-----> starting production servers
production node:
user : root
host : 51.140.86.5
path : /home/hladmin
response: ok
START DONE!
Run Code Online (Sandbox Code Playgroud)
但是当我们netstat -plnt按照check-running-services-on-linux的 …
运行时出现此错误 mix edeliver build release production --verbose
A remote command failed on:
deploy@80.111.111.80
Run Code Online (Sandbox Code Playgroud)
但是当我登录服务器时,Elixir(以及 Mix)似乎安装得很好。
ssh deploy@80.111.111.80
deploy@80.111.111.80:~$ mix -v
Erlang/OTP 20 [erts-9.0] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:10] [hipe] [kernel-poll:false]
Mix 1.5.0
Run Code Online (Sandbox Code Playgroud)
它似乎工作正常。Edeliver 在查找 Elixir 安装时遇到问题是什么?我使用 asdf 版本管理器安装 Elixir 和 Erlang。
我正在使用edeliver在aws上部署.部署运行正常,但是当我尝试在控制台中访问该站点时curl localhost:8888,我收到connection refused错误.
如果我尝试启动应用程序./rel/bin/app_name console,我会得到一个(RuntimeError) expected the PORT environment variable to be set.但是我config/prod.exs看起来像这样.
use Mix.Config
config :elixir_deploy, ElixirDeployWeb.Endpoint,
load_from_system_env: true,
http: [port: 8888],
ssl: false,
url: [host: "example.com", port: 80],
cache_static_manifest: "priv/static/cache_manifest.json"
config :logger, level: :info
import_config "prod.secret.exs"
Run Code Online (Sandbox Code Playgroud)
我在这里错过了什么?如果我PORT=8888在手动启动之前设置了它,它可以工作,但我宁愿自动启动edeliver
我有Phoenix应用程序(我使用--api标志创建了它),其中包含一些处理我存储在中的请求所需的其他数据priv/data/filters.csv。
因此,它在dev模式下可以正常工作,我可以像这样读取该文件:File.stream!("priv/data/filters.csv"),但是使用mix edeliver update该文件交付应用后,将无法再访问它。
我可以在构建目录中看到该文件夹,但是在交付应用程序之后,没有该文件夹priv。我不确定为什么不将其复制到传递文件夹中。
我做错了什么?交付过程后是否需要复制这些文件?在哪里可以存储必须以生产方式使用的文件?