hapipal / boilerplate

A friendly, proven starting place for your next hapi plugin or deployment
https://hapipal.com
183 stars 27 forks source link

Docker flavor nodemon args #92

Closed erin-doyle closed 4 years ago

erin-doyle commented 4 years ago

In the docker-compose.yml file of the Docker flavor it lists the command for running nodemon as the following:

        command: [
            "./node_modules/.bin/nodemon",
            "--watch",
            "lib/**/*",
            "--watch",
            "server/**/*",
            "server/index.js"
        ]

This fails with: [nodemon] clean exit - waiting for changes before restart

The nodemon docs state not to use glob formatting: https://github.com/remy/nodemon#monitoring-multiple-directories.

If I change to command to instead be:

        command: [
            "./node_modules/.bin/nodemon",
            "--watch",
            "lib",
            "--watch",
            "server",
            "server/index.js"
        ]

it starts up successfully.

devinivy commented 4 years ago

Interesting, I haven't seen this issue happen before. I would love to be able to reproduce this and understand what is going onβ€” I just tried without any luck. (Are you on a windows machine, by chance?) Either way, I think your solution looks good and we would certainly take a PR πŸ‘ Thanks for the close reading of those docs. For anyone interested, just point the PR at this branch https://github.com/hapipal/boilerplate/tree/flavor-docker

erin-doyle commented 4 years ago

No I'm using a mac running Catalina 10.15.5 with: Docker Desktop v2.3.0.4 nodemon 2.0.4 node v14.3.0 (on my machine)

though the node version in the container is 12.18.3 and alpine 3.11

Not sure if any of that helps. But anyway, I can submit a PR for it.

devinivy commented 4 years ago

Cool, thanks for the info. That would be excellent πŸ‘

devinivy commented 4 years ago

Resolved by #93. Thanks @erin-doyle! Publishing the flavor update now.