You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Everything is working in CI, and on local. Code doesn't look wildly different than what's on here for root-chapter-10-part2 (configuration files, Dockerfile, CI general.yml, and DO spec.yaml).
When deploying it builds fine, but fails at the deploy step, showing only these 2 lines in the log:
[2024-10-29 18:27:58] {"v":0,"name":"zero2prod","msg":"Failed to open `.pgpass` file: Os { code: 2, kind: NotFound, message: \"No such file or directory\" }","level":40,"hostname":"zero2prod-*****","pid":1,"time":"2024-10-29T18:27:58.90837181Z","target":"sqlx_postgres::options::pgpass","line":46,"file":"/usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/sqlx-postgres-0.8.2/src/options/pgpass.rs","path":"/root/.pgpass"}
[2024-10-29 18:27:58] Error: Connection refused (os error 111)
I'll admit I haven't deployed to DO in quite a few chapters now, but it was working previously. I get the same result doing a docker run zero2prod from the command line.
I'm guessing this is a failed connection to the database?
The text was updated successfully, but these errors were encountered:
The first line in your logs is just a warning, see here for an explanation of why you're getting that and how to suppress it.
As for your your question, I would suspect you are correct. My best guess would be that your postgres instance isn't actually running or is listening on a non standard port. If you're running the database with docker, make sure that the container is running before you run your code/tests.
This however is a guess. If you provide some more context (docker logs, db config, etc), I could try to help more (assuming you haven't figured it out yet).
Everything is working in CI, and on local. Code doesn't look wildly different than what's on here for root-chapter-10-part2 (configuration files, Dockerfile, CI general.yml, and DO spec.yaml).
When deploying it builds fine, but fails at the deploy step, showing only these 2 lines in the log:
I'll admit I haven't deployed to DO in quite a few chapters now, but it was working previously. I get the same result doing a docker run zero2prod from the command line.
I'm guessing this is a failed connection to the database?
The text was updated successfully, but these errors were encountered: