Skip to content
This repository has been archived by the owner on Mar 27, 2019. It is now read-only.

Document how to run vault-ui docker image without nodemon #226

Closed
margueritepd opened this issue Dec 29, 2017 · 7 comments
Closed

Document how to run vault-ui docker image without nodemon #226

margueritepd opened this issue Dec 29, 2017 · 7 comments

Comments

@margueritepd
Copy link

margueritepd commented Dec 29, 2017

I got this error when running vault-ui as a docker container:

yarn run v0.24.4
$ nodemon ./server.js
[nodemon] 1.11.0
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: *.*
[nodemon] starting `node ./server.js`
[nodemon] Internal watch failed: watch /app ENOSPC
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Apparently this is related to the fs.inotify.max_user_watches system setting being set too low, similar to what is described here.

Currently it is the docker image's default to serve files via nodemon, which is what is using all these inotify watches:

  1. the CMD in the Dockerfile is here,
  2. which runs yarn serve
  3. which runs nodemon

However, I am not running the container in development. I don't need these file-watching abilities, and I would prefer to circumvent nodemon. I think the correct way to do this is to run the docker image with node server.js or node server.js start_app as the command argument, but I am too unfamiliar with the node toolchain to be certain which is the correct command.

It would be great if you could document the correct way of running the docker container that circumvents nodemon.

@margueritepd margueritepd changed the title Document how to run vault-ui without nodemon Document how to run vault-ui docker image without nodemon Dec 29, 2017
@Lucretius
Copy link
Collaborator

You can just replace nodemon with node and you'll run the server without the automatic restarting that nodemon provides. Documentation-wise I can make a small change to point this out.

@margueritepd
Copy link
Author

@Lucretius Thanks. To clarify, it would be good to document how to run the already-built docker image with node, rather than how to change the package.json to run with node.

@maxvt
Copy link

maxvt commented Jan 2, 2018

If the docker image is primarily intended for people running vault-ui and not developing it (sounds like a reasonable assumption), it would make sense for the default configuration to be intended for production. This might mean using node by default, and switching to nodemon for development only.

@djenriquez
Copy link
Owner

No problem guys, this fix should be super quick. Working on it now.

@djenriquez
Copy link
Owner

#227 handles the difference between development and default runs. By default, Vault-UI will launch with node.

@djenriquez
Copy link
Owner

@margueritepd please test out :latest and verify it fixes the issue you see then close this issue. This issue will be closed otherwise in 48 hours if no response 👍 .

@margueritepd
Copy link
Author

margueritepd commented Jan 4, 2018

@djenriquez I probably won't get to this before you want to close the ticket, but your change looks good! when I try it, if I run into issues I'll report back here. Thanks a lot!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants