#Is it possible for development to have autoreload ? (docker-compose exemple)

1 messages · Page 1 of 1 (latest)

outer prairie
#

Is it possible to autoreload ? here is an exemple with npm run dev:watch

version: '3'
services:
    mongodb:
        image: mongo:4
        ports:
            - 27017:27017
    app:
        build: nodejs-with-mongodb-api-example
        command: npm run dev:watch
        ports:
            - 4000:4000
        environment: 
            MONGO_URL: mongodb
            PORT: 4000
        volumes:
            - ./nodejs-with-mongodb-api-example:/src/
            - nodemodules:/src/node_modules
        links:
            - mongodb
        depends_on: 
            - mongodb

volumes:
    nodemodules: {}
#

Is it the same, With python SDK, as : with_mounted_directory("/src", "./nodejs-with-mongodb-api-example")

hardy stirrup
#

We do not support auto reload for now, but thanks to caching it should be pretty fast to recreate a container if you use Dagger to expose a service

fickle night
outer prairie
outer prairie
hardy stirrup
#

Ohhh I don't think it's the right use case, Dagger is used to execute specific task on your project, like linting, building, serve an app etc...
What kind of operation are you trying to accomplish that should be watched if dagger code changes?

outer prairie
hardy stirrup
#

I see, yeah Dagger is a good use case for it, but we first need to support live reloading
I use Dagger to reproduce my prod environment but it's true that I manually rerun my dagger call when I want to test an update

#

Which is quite fine because Go has no watcher by default so it's not that impacting compared to my non-dagger experience