#Hot-reload within Dagger

1 messages · Page 1 of 1 (latest)

rich escarp
#

Context: I have a nextjs application which is really good at hot-reloading. I'd like to have a docker-compose like experience with the database, via Dagger, so run the nextjs app in dev mode in Dagger, expose the port for browswer preview, attach the database as a service.

Is there a way to get host directory changes to be reflected in the one mounted into the nextjs container?

late osprey
#

AFAIK not possible in dagger v0.6.4. Not sure if Zenith will enable some of this. cc @main nymph.

rich escarp
#

I wonder if something of a hack could be done with a shared cache again thinkies

late osprey
#

problem is host <> dagger sync.. since Dagger / Buildkit is designed to be share-nothing as it's designed to be able to be fully deterministic to work remotely

#

my best guess is that something would be possible by rsyncing the contents over a unix socket somehow.. but seems like a very hacky alternative

odd kraken
#

(ideally this would just be a first-class feature so you don't need that of course)

rich escarp
#

though we probably need a version that passes the event through, so that we can see what changed and how, and then make the mirroring action

wraith anvil
#

@rich escarp curious if you got this working? Or if there's a dagger issue to follow... Thanks!

rich escarp
#

I never tried to implement it