3 ms·
But how does this work when talking to dev databases on my machine?
by quest88 4y ago
But how does this work when talking to dev databases on my machine?
- zeroxp 4y agoDockerized applications can still reach services on the localhost, but you may want to take a look at docker compose so you get your application and backing systems in one place. It makes your local development environment incredibly resilient.
- quest88 4y agoDo you have an example how that would work? I unsuccessfully spent quite a while trying to get a docker container running rails to talk to a docker container running postgre. And I wanted to postgre container to persist to the host's disk so I could save state between runs. Maybe that wasn't the best way to do it though?
- perlwle 4y agoDB data can be stored in volume and persisted. There are a lot of dockerfile / compose examples on github. * https://github.com/docker/awesome-compose https://github.com/docker/awesome-compose * https://github.com/jessfraz/dockerfiles https://github.com/jessfraz/dockerfiles
- bradgessler 4y agoThe Dockerfile is not optimized for a development environment. It might work for some cases, but this default file is really all about “how can the probability of a successful production deployment be improved out of the box?” Getting a Docker compose dev env working is another can of worms. Maybe I should write about that next?