【发布时间】:2018-02-28 03:49:18
【问题描述】:
我有一个用 elixir/phoenix 编写的简单网站。 我今天做了一些更改,想将其部署到生产环境中。
我推送了我的 repo,将其拉到生产服务器上并构建了一个版本:
MIX_ENV=prod mix release
它失败了...
所以我用--verbosity=verbose 再次运行它,但它失败了:
silent])===> Provider (relup) failed with: {error,
{rlx_prv_relup,
{relup_script_generation_error,
systools_relup,
{file_problem,
{"/home/herman/alive/rel/alive/lib/elixir-1.1.1/ebin/elixir.appup",
{error,
{open,
"/home/herman/alive/rel/alive/lib/elixir-1.1.1/ebin/elixir.appup",
enoent}}}}}}}
有人知道怎么解决吗?
当前版本 0.0.6 在 elixir 1.1.0 下运行,新版本 0.0.7 下运行 1.1.1。
我的 mix.exs:
defmodule Alive.Mixfile do
use Mix.Project
def project do
[app: :alive,
version: "0.0.7",
elixir: "~> 1.0",
elixirc_paths: elixirc_paths(Mix.env),
compilers: [:phoenix] ++ Mix.compilers,
build_embedded: Mix.env == :prod,
start_permanent: Mix.env == :prod,
deps: deps]
end
# Configuration for the OTP application
#
# Type `mix help compile.app` for more information
def application do
[mod: {Alive, []},
applications: [
:phoenix,
:phoenix_html,
:cowboy,
:logger,
:phoenix_ecto,
:timex,
:mariaex]
]
end
# Specifies which paths to compile per environment
defp elixirc_paths(:test), do: ["lib", "web", "test/support"]
defp elixirc_paths(_), do: ["lib", "web"]
# Specifies your project dependencies
#
# Type `mix help deps` for examples and options
defp deps do
[{:phoenix, "~> 1.0.1"},
{:phoenix_ecto, "~> 1.1"},
{:mariaex, ">= 0.0.0"},
{:phoenix_html, "~> 2.1"},
{:phoenix_live_reload, "~> 1.0", only: :dev},
{:cowboy, "~> 1.0"},
{:timex, ">= 0.0.0"},
{:exrm, "~> 0.19.9"},
{:rebar3_hex, ">= 0.0.0"},
{:plug_forwarded_peer, "~> 0.0.2" }
]
end
end
【问题讨论】:
-
您也可以使用
distillery代替exrm: - Official Hexdocs Documentation of distillery with phoenix - Medium Article describing distillery use