Following the standard procedure to create a new Phoenix/Elixir project. However, encounter error during installation. Please comment how to solve this error.
0. Setting
$ node -v
v14.18.1
$ npm -v
6.14.15
$ elixir -v
Erlang/OTP 24 [erts-12.1.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [jit] [dtrace]
Elixir 1.12.3 (compiled with Erlang/OTP 24)
$ mix phx.new --version
Phoenix installer v1.6.2
1. Create a folder to persist the DB data.
mkdir ${HOME}/phoenix-postgres-data/
2. Run a Docker container with the Postgres image.
$ docker run -d \
--name phoenix-psql \
-e POSTGRES_PASSWORD=Phoenix1234 \
-v ${HOME}/phoenix-postgres-data/:/var/lib/postgresql/data \
-p 5432:5432 \
postgres
3. Validate that the container is running.
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
fca9fbc140e6 postgres "docker-entrypoint.s…" 4 hours ago Up 6 minutes 0.0.0.0:5432->5432/tcp, :::5432->5432/tcp phoenix-psql
4. Creating a New Project
$ mix phx.new pento --live
* creating pento/config/config.exs
* creating pento/config/dev.exs
* creating pento/config/prod.exs
* creating pento/config/runtime.exs
...
* creating pento/priv/static/favicon.ico
Fetch and install dependencies? [Yn] Y
* running mix deps.get
* running mix deps.compile
5. Finishing touch
$ cd pento
$ mix ecto.create && mix phx.server && iex -S mix phx.server
Error Message
Compiling 14 files (.ex)
Generated pento app
18:47:31.378 [error] GenServer #PID<0.411.0> terminating
** (Postgrex.Error) FATAL 28P01 (invalid_password) password authentication failed for user "postgres"
(db_connection 2.4.0) lib/db_connection/connection.ex:100: DBConnection.Connection.connect/2
(connection 1.1.0) lib/connection.ex:622: Connection.enter_connect/5
(stdlib 3.16.1) proc_lib.erl:226: :proc_lib.init_p_do_apply/3
Last message: nil
State: Postgrex.Protocol
18:47:31.423 [error] GenServer #PID<0.419.0> terminating
** (Postgrex.Error) FATAL 28P01 (invalid_password) password authentication failed for user "postgres"
(db_connection 2.4.0) lib/db_connection/connection.ex:100: DBConnection.Connection.connect/2
(connection 1.1.0) lib/connection.ex:622: Connection.enter_connect/5
(stdlib 3.16.1) proc_lib.erl:226: :proc_lib.init_p_do_apply/3
Last message: nil
State: Postgrex.Protocol
** (Mix) The database for Pento.Repo couldn't be created: killed