I'm trying to get a phoenix/postgres web app up running with nanobox/digitalocean. The last hours I tried everything but it just cannot connect with the postgres server.
The last error was a 4104 with this stack trace:
! FAILED TO BEFORE_LIVE1: MIX ECTO.CREATE --QUIET !
su - gonano -c "cd /app; siphon --prefix '' -- bash -i -l -c \"mix ecto.create --quiet\""
e[31me[1m** (Mix) The database for NanoboxPhoenix.Repo couldn't be created: FATAL 28000 (invalid_authorization_specification): no pg_hba.conf entry for host "192.168.0.16", user "postgres", database "postgres", SSL offe[0m
20:39:17.869 [error] GenServer #PID<0.194.0> terminating
** (Postgrex.Error) FATAL 28000 (invalid_authorization_specification): no pg_hba.conf entry for host "192.168.0.16", user "postgres", database "postgres", SSL off
(db_connection) lib/db_connection/connection.ex:163: DBConnection.Connection.connect/2
(connection) lib/connection.ex:622: Connection.enter_connect/5
(stdlib) proc_lib.erl:247: :proc_lib.init_p_do_apply/3
I'm wondering why it looks for user "postgres", database "postgres"...
I do not understand if I should put the infos from "nanobox info local" ("nanobox info dry-run" / Environment variables from nanobox web dashboard) into "config\dev.exs" (test.exs / prod.exs) or if I should always put this into the files:
If I should take the info from "nanobox info local" and "nanobox info dry-run" then the db_user is both "nanobox" but with two different passwords. I cannot set up a postgres user with 2 different passwords...
The guides also often use "[app]dev", "[app]test" (e.g. https://content.nanobox.io/elixir-app-deployment-with-nanobox/) for database_name, but then again it's said that the databases are always named "gonano" - what's true?
Thanks for help!