As nowadays many complex web-applications run on production containerized, we keep developing them in 'old-school' way, installing the Postgresql, ...
For further actions, you may consider blocking this person and/or reporting abuse
One more question if you don't mind. As far as I see from "- .:/app:cached", you use mac. Do your coworkers use Linux?
I'm asking because running "run" on Linux without "--user" option creates files with "root" owner. And running without this option raises error because of "- BUNDLE_PATH=/bundle". It's not allowed to write to root folder for non root users.
Do you solve it somehow? Or your entire team uses mac?
Thanks
For now, I do not have such problems, because of mac.
I think you could change BUNDLE_PATH for something less like '/app/bundle' not to be a root directory?
Do you also consider to run the docker as non-root user for linux?
Yes, I do it this way now, but annoying
bundle
folder (though empty) gets created in app directory on host. And still no luck because bundler says/ is not writable.
You mean docker command? I run it as non-root, but there's still this issue on Linux github.com/docker/compose/issues/1...
My last set of questions :)
Thanks a lot for your answers!
Thanks for the questions, they are really make sense!
1) seems setting it in docker-compose is redundant
2) most suitable place, I think, is to leave the bundle install at
bin/setup
where it usually is, like here github.com/thepracticaldev/dev.to/...Thanks for great article! Just one small note. You mentioned example of running rake task
Shouldn't it be "run" instead of "up"?
Yep, Alexarder, this is good point! fixed
This is interesting but I find it hard to follow, if someday you write a simpler docker tutorial, I'll be so happy :D
Great Article! How do you debug and create code break points in the runtime. Maybe you could devote a section on this topic?
There are two options using
binding.pry
:1) Attach to running server container after hitting
pry
with2) Run server with this command instead of
docker-compose up
Docker network architecture covers all network scenarios required for successful communication at the local, remote or cluster level.
Nice article!
I'm curious about puma/sidekiq. Let's say I want to spawn them few processes, how could I do it?
Hi!
There is no problem, just run
puma -w 2
orsidekiq -c 2
or whatever you wantBut in most cases 1 worker is enough for local development
Thanks a lot for this article, it was very interesting!
I think it would benefit from having an improved English, it would make it a lot easier to read.
Thanks again though!
Thanks, try to make it better :)