加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

postgresql – 用phoenix heroku设置travis ci

发布时间:2020-12-13 16:00:46 所属栏目:百科 来源:网络整理
导读:我遇到了使用Travis CI自动部署到我的Phoenix应用程序的Heroku的问题.这是Travis CI构建错误: (Mix) The database for AgilePulse.Repo couldn't be created: tcp connect: connection refused - :econnrefused 这是我的.travis.yml配置: language: elixir
我遇到了使用Travis CI自动部署到我的Phoenix应用程序的Heroku的问题.这是Travis CI构建错误:

(Mix) The database for AgilePulse.Repo couldn't be created: tcp connect: connection refused - :econnrefused

这是我的.travis.yml配置:

language: elixir
elixir:
  - 1.3.2
otp_release:
  - 19.0
sudo: false
addons:
  postgresql: '9.5'
notifications:
  email: false
env:
  - MIX_ENV=test
before_script:
  - cp config/travis_ci_test.exs config/test.secret.exs
  - mix do ecto.create,ecto.migrate

这是我的travis_ci_test.exs:

use Mix.Config

# Configure your database
config :agile_pulse,AgilePulse.Repo,adapter: Ecto.Adapters.Postgres,username: "postgres",password: "",database: "travis_ci_test",hostname: "localhost",pool: Ecto.Adapters.SQL.Sandbox

任何指针将不胜感激!

附加信息:

> GitHub回购:https://github.com/cscairns/agile-pulse-api

解决方法

再看一下:根据你发布的travis日志判断,看起来你正在为你的构建引导一个Ubuntu 12.04 Precise;我怀疑Postgres 9.5没有准确的:

https://docs.travis-ci.com/user/database-setup/#Using-a-different-PostgreSQL-Version

您可以尝试切换到Postgres 9.4,看看它是否有效?

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读