LukeMathWalker / LukeMathWalker/zero-to-production
10.7.4.2 Deploy to Digital Ocean Fails
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 6.5k
- Forks
- 585
- PR merge metrics
- No merged PRs in 30d
Description
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?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the configuration files, Dockerfile, CI general.yml, and DO spec.yaml for root-chapter-10-part2, then reproduce the failure with docker run zero2prod and inspect the deployment logs. Done means the Digital Ocean deployment completes successfully and the application can connect to its database.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, postgresql, rust
- Domain
- cloud, databases, devops
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100