- 3mo ·
-
Public·
-
mastodon.social
So, Docker people that _do_ develop with the Rails app in a container: how do you manage syncing/reloading the app after the filesystem changes?
So, Docker people that _do_ develop with the Rails app in a container: how do you manage syncing/reloading the app after the filesystem changes?
@nateberkopec Volumes for each interesting folder (app, config, etc)
@nateberkopec since we use @orbstack volume mounts are a non-issue. With Docker for Desktop there are a ton of tweaks necessary to make it suck less.
@nateberkopec this was the biggest problem for us at Lumos Labs. Regular volumes were way too slow, so we switched to NFS volumes, which worked better. But yeah, the whole thing kinda sucked.
Codespaces FTW
volumes:
- .:/app:cached
And it's obnoxiously slow on MacOS. (Better than it was a couple years ago, though)
@nateberkopec I create a bind mount to my local disk of the entire git checkout. This works well. On macOS, this can be slower than direct disk access but it's gotten faster and it doesn't bother me, especially with the simplicity of the setup (I have also had success with NFS mounts).
In both cases, all tools for auto-doing-stuff must support filesystem polling. Most seem to?
@nateberkopec I bind to my local disk, but I'm on Linux, MacOs sucks with docker. I think the Mac users here are using remote virtual boxes with Linux to overcome this.
@nateberkopec I'll also chime in to say that OrbStack has made this pretty much a non-issue (on my M3); I just mount the folder and it works.
@nateberkopec we use tilt.dev with docker-compose (instead of k8s). No need for bind mounts, but has its quirks.
@nateberkopec
```yaml
volumes:
- .:/app:cached
- bundle_cache:/bundle
```
on the 'app' service, works for us