Progrider

Programming discussion

Search

Searches topics and replies. Every word has to appear in the post.

10 posts found.

PostPosted
Help · post #3

Yep, .env still said localhost. Changed to db and it connected. Resolved.


by sam
Help · post #2

Inside the web container, localhost is the web container. Use the service name: postgres://...@db:5432/. Check DATABASE_URL in your .env, it's probably still localhost from running outside docker.


by Anonymous
Help · post #1

Two services in docker compose, web and db. Web fails with ECONNREFUSED 127.0.0.1:5432 even though db is up and the logs say it's accepting connections. Works fine when I run the app outside docker. What am I missing?


by sam
Help · post #7

Down to 12GB, and the logging's capped now. Thanks.


by sam
Help · post #6

Or don't use docker.


by vek
Help · post #5

docker system prune -a removes all images not used by a running container. Leave out --volumes unless you've read what that does. People have lost databases.


by lintroller !-TjZOnKc
Help · post #4

daemon.json: { "log-driver": "json-file", "log-opts": { "max-size": "10m", "max-file": "3" } } Only applies to containers created after you restart the daemon, so recreate them. For now truncate -s 0 the file. Don't rm it while the containe…


by rproxy
Help · post #3

31GB of log for one container. wow.


by sam
Help · post #2

docker system df -v to see the breakdown. Usual suspects are old images from rebuilds, build cache, and container logs. The logs are in /var/lib/docker/containers//-json.log and by default they grow forever.


by rproxy
Help · post #1

VPS started failing writes. du says most of it is /var/lib/docker. I only have four containers! How do I find out what it is and what's safe to delete?


by sam
All times shown in UTC.