IMHO “.., I use just one Docker container” is the first order of (your) business to get straighten out :)
Using containers with Rails is quite a feast - and an added bonus is that once set up you have next to zero footprint on your ‘own’ computer (that is a blatant lye ‘cause your code base needs to sit somewhere, and the docker images has to be in place too - but even that could be ‘clouded’) Docker containers doesn’t really start to shining until you let them ;) That is - delegate delegate delegate - or: one container per “task” You’ll have at least three containers spinning - again IMHO. An app container with the Puma webserver serving the Rails stuff, a database container for the Rails models to persist their data, and a container for a reversed NgINX proxy serving clients on 80/443 and forwarding the necessary requests to the ‘animal’ (Puma). Other container candidates are: Redis, Sidekiq, and memcached. Here are the observations by Cloud66 - https://blog.cloud66.com/containers-for-rails-developers-use-containers-while-staying-true-to-your-ror-roots/ <https://blog.cloud66.com/containers-for-rails-developers-use-containers-while-staying-true-to-your-ror-roots/> Use hub.docker.com <http://hub.docker.com/> to load the necessary images, then use github.com to load the codebase, then docker-compose build docker-compose up (-d if you’d like it to sit in the background=daemonized) That’s it - more or less Getting there will take you through one/two hoops I know for sure but it’s worth the journey! Start by following this example: https://www.chrisblunt.com/ruby-on-rails-running-tests-with-guard-and-docker/ <https://www.chrisblunt.com/ruby-on-rails-running-tests-with-guard-and-docker/> Chris Blunt did an excellent demonstration job! Cheers, Walther > Den 30. okt. 2019 kl. 18.08 skrev Jason Hsu <jhsu802...@gmail.com>: > > Yes. However, I use just one Docker container that contains everything I > need, including Ruby, Rails, Node.js, PostgreSQL, Redis, etc. I know that my > way is crude, but it works. I can't move on to the docker-compose way of > doing things until I figure out all the issues that are stopping me. > > On Wednesday, October 30, 2019 at 11:07:06 AM UTC-5, Brandon McClelland wrote: > You said "When I log into my custom Docker container, I basically follow the > same procedure that the people who rely on their host environments do." Can > you run the tests successfully that way? > > > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to rubyonrails-talk+unsubscr...@googlegroups.com > <mailto:rubyonrails-talk+unsubscr...@googlegroups.com>. > To view this discussion on the web visit > https://groups.google.com/d/msgid/rubyonrails-talk/5a60f0c7-2dfe-4b03-8a71-679901587b59%40googlegroups.com > > <https://groups.google.com/d/msgid/rubyonrails-talk/5a60f0c7-2dfe-4b03-8a71-679901587b59%40googlegroups.com?utm_medium=email&utm_source=footer>. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/453044F1-3354-4E30-9F6F-EB3C48318113%40diechmann.net.