David Kimura PRO
Joined 7/18/2015
Drifting Ruby Owner
David Kimura PRO said over 4 years ago on Docker on Rails 7 :
Ok, and the docker-compose looks the same far as the volume stuff goes?


David Kimura PRO said over 4 years ago on Docker on Rails 7 :
Try docker compose up --build to see if rebuilding the images help. There could have been some weird issue with the file sync. Is this your first time trying docker   or have you been using it for some time?

David Kimura PRO said over 4 years ago on Docker on Rails 7 :
I would have a separate Dockerfile for the production image. In my case, if I do deploy to an x86 production environment, I would need to build the image anyways. I would do this in my CI/CD platform, but if I had to do it on my local machine (Apple Silicon SoC) then I would have to emulate the x86 CPU. So, between this and needing to have entrypoints, commands, or exposing ports, I would rather have a bit of duplication between dockerfiles and have separate environment specific ones.

Side note, this is the command that I use to build for different platforms and CPUs. 

docker buildx build -f Dockerfile --platform linux/amd64 -t registry/app_name:tag --push .

David Kimura PRO said over 4 years ago on Importmaps in Rails 7 :
  Importmaps is getting better, but I still prefer esbuild over importmaps. I think that there is still a disconnect with libraries that use CSS when consuming them with Importmaps. 

My preferred way is to use jsbundling-rails (esbuild) and cssbundling-rails (bootstrap). This gives it more of a hybrid feel between the old Rails 4 way and webpacker, but without all of the overhead of webpacker.

David Kimura PRO said over 4 years ago on Importmaps in Rails 7 :
If anything, you would use Importmaps for JS libraries and then CSSBundling for the CSS libraries. That's why I'd prefer esbuild and cssbundling over importmaps to get to a, what feels like a normal way, of managing assets.

rails new my_app \
--javascript esbuild \
--css bootstrap

In fact, I just keep the flags in my .railsrc file

➜  ~ cat .railsrc
--skip-jbuilder
--javascript esbuild
--css bootstrap