I’m facing a problem when deploy to Digital Ocean using docker (node.js) and Postgres database.
I searched on forum and saw that 2 people had a similar problem, but how they they solved is not working for me.
After make the deploy to DO, the target production light doesn’t turn green:
On project settings, the connection with the remote container is working:
BUT, when I try to connect to the database to create the tables:
I tried to copy db_save.sql I generated on development enviroment to the production target folder and did not work as well.
Then I clicked on “Show logs” button, and found this:
2021-02-17 21:29:24.063 UTC  LOG: database system is shut down
db_1 | 2021-02-17 21:30:24.529 UTC  LOG: listening on IPv4 address “0.0.0.0”, port 5432
db_1 | 2021-02-17 21:30:24.529 UTC  LOG: listening on IPv6 address “::”, port 5432
db_1 | 2021-02-17 21:30:24.530 UTC  LOG: listening on Unix socket “/var/run/postgresql/.s.PGSQL.5432”
db_1 | 2021-02-17 21:30:24.546 UTC  FATAL: could not open log file “/custom_sql_log/postgres_query.log”: No such file or directory
db_1 | 2021-02-17 21:30:24.547 UTC  LOG: database system is shut down
web_1 | [nodemon] 2.0.7
web_1 | [nodemon] to restart at any time, enter
web_1 | [nodemon] watching path(s): app//* lib//* views//* extensions//* tmp/**/restart.txt
web_1 | [nodemon] watching extensions: ejs,js,json
web_1 | [nodemon] starting
web_1 | Warning: connect.session() MemoryStore is not
web_1 | designed for a production environment, as it will leak
web_1 | memory, and will not scale past a single process.
web_1 | App listening at http://localhost:3000
Then, I logged to my web server and run “docker ps” command and look what I got:
The DB container keeps on restarting again on again!
Is this a bug? Thanks!