I'm running into issues with automating deployments with Travis CI to Heroku for my Phoenix app. Here's Travis CI build error:
(Mix) The database for AgilePulse.Repo couldn't be created: tcp connect: connection refused - :econnrefused
Here's my .travis.yml
config:
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
Here's my 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
Any pointers would be greatly appreciated!
Additional info:
On a second look: judging by the travis log you posted, looks like you're bootstrapping an Ubuntu 12.04
Precise for your build; I suspect that Postgres 9.5
is not available on precise
:
https://docs.travis-ci.com/user/database-setup/#Using-a-different-PostgreSQL-Version
Could you try switching to Postgres 9.4
and see if that works?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With