WebThingsIO / gateway-docker

Legacy docker image for WebThings Gateway - now moved to main gateway repo at https://github.com/WebThingsIO/gateway
Mozilla Public License 2.0
72 stars 25 forks source link

Minor fixes for next release (originally fixing yarn warning) #9

Closed rzr closed 6 years ago

rzr commented 6 years ago

yarn failed to install and thus failed to install gateway dependencies, to we relocate it to let it find gateway's package.json file.

Observed (silent) issue on docker 17.12.1-ce (Ubuntu-18.04) on x86_64:

npm WARN saveError ENOENT: no such file or directory, open '/home/node/package.json'
(...)
+ yarn@1.9.4
added 1 package in 0.447s
Cloning into 'intent-parser'...
Cloning into 'gateway'...
yarn install v1.9.4
[1/4] Resolving packages...
[1/4] Resolving packages...
[2/4] Fetching packages...
info fsevents@1.2.4: The platform "linux" is incompatible with this module.
(...)
[3/4] Linking dependencies...
[4/4] Building fresh packages...

Change-Id: I8737dfc28da8c8bf266de829725f3c09f62d9468 Signed-off-by: Philippe Coval p.coval@samsung.com

mrstegeman commented 6 years ago

@rzr I intended for it to be installed in the home directory, rather than conflict with the gateway's own package.json. It's not a big deal if it can't be saved to /home/node/package.json, as yarn will still work just fine. Your log shows that yarn is running just fine.

rzr commented 6 years ago

OK I think I faced a bigger problem I will update PR eventually

rzr commented 6 years ago

With this change: https://github.com/mozilla-iot/gateway/pull/1260

I noticed that wpa-supplicant was missing I will replace this PR once everything is checked.

mrstegeman commented 6 years ago

We just need to run the gateway without the --check-wifi flag.

rzr commented 6 years ago

Ok so the change should be in runapp.sh ? I am trying this too

mrstegeman commented 6 years ago

Yes, either that or we need a separate startup script.

hobinjk commented 6 years ago

Is there any reason you don't want to use yarn start here? The way I see it run-app.sh is the script for running on a real production device. My main question would be if there's ever a case when you'd want to OTA upgrade a docker-based installation, because then using run-app.sh would be reasonable.

mrstegeman commented 6 years ago

yarn start is probably sufficient, with a log redirect. I plan on building and releasing an 0.5 image when I'm back in a couple weeks.

rzr commented 6 years ago

I'll be back in 1 week too, maybe I could add a couple of changes more but it's not critical

rzr commented 6 years ago

@mrstegeman beware @hobinjk might drop yarn support, can we just rely on NPM ?

https://github.com/mozilla-iot/gateway/pull/1286

mrstegeman commented 6 years ago

That shouldn't be a problem. I'll tackle it when necessary.

hobinjk commented 6 years ago

@rzr The potential dropping of yarn support is very far in the future since it would require changing a significant amount of our build scripts. It's definitely not something that will happen soon enough to impact this PR