Postgresql error when running the RDB Alpha Docker container

Greetings! I have been working through the CodeRoad tutorials. I am newish to this, so I just started the https://raw.githubusercontent.com/freeCodeCamp/learn-relational-databases-by-building-a-mario-database/main/tutorial.json

The first time I started the tutorial it worked just fine, but then when I restarted my computer and spun up the docker container of RDB Alpha, I ran into a postgresql error…that I can’t seem to get past. Here’s the error when I pass the command through the terminal:

$ psql --username=freecodecamp dbname=postgres
psql: error: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket “/var/run/postgresql/.s.PGSQL.5432”?

Any ideas? Thank you!

1 Like

I vaguely remember when tutorial is stopped in the middle, there might be need to manually start postgres service, once tutorial is started again. If I’m not mistaken command would be something like:
sudo service postgresql start

4 Likes

this worked for me, thanks!