Open techstore56 opened 2 years ago
Hello @techstore56 ,
Most probably you don't have the database running. Make sure that you have PostgreSQL database running at the correct address.
Also, it will be much easier to just run docker-compose up
to run both database and the service.
<migration.migrate(); // <-- run migrations. This guy will throw on error.> how to deal this error
<migration.migrate(); // <-- run migrations. This guy will throw on error.> how to deal this error
@lizemin5235 , use try - catch
reproduce:
$ docker build -t example-postgresql . $ docker run -p 8000:8000 -e CONFIG_PROFILE='dev' -t example-postgresql
D |2021-10-20 04:43:45 1634705025742559| Server:Loading configuration profile 'dev' terminate called after throwing an instance of 'std::runtime_error' what(): [oatpp::postgresql::Executor::getConnection()]: Error. Can't connect.