scripting / nodeStorage

A simple storage system based on Twitter identity implemented in Node.js.
GNU General Public License v2.0
103 stars 9 forks source link

Configuration option to disable updater #5

Closed donpark closed 8 years ago

donpark commented 8 years ago

Unless I'm mistaken, update.doUpdate will execute

git clone https://github.com/scripting/nodeStorage.git

every 15 minutes and overwrite code that differs regardless of modification time.

This has following effects:

  1. update code has to manually disabled to prevent changes during development from being overwritten.
  2. forked versions have to modify urlMyRepo to prevent modified code from being overwritten with upstream code.
  3. docker containers cannot be read-only.

I recommend adding a configuration option (via both process.env and config.json) that disables updater.

This is an enhancement request.

scripting commented 8 years ago

Don, there is an option in config.json to disable updates.

Add a top-level object named "updates" with a single value "enabled" set to false.

Here's an example config.json that illustrates.

https://gist.github.com/scripting/c7559b83c36a3ad88e1b3057be323b88

Dave

donpark commented 8 years ago

Aha. Thx. I missed that because I looked only in javascript code. Whole code in OPML thing is a mystery to me.

scripting commented 8 years ago

Don, ignore the OPML code.

I include it as a backup.

Don't let it confuse you. Just focus on the JS files.

donpark commented 8 years ago

Good to know. One thing I do need to understand is how 1999 integrates with nodeStorage. Setup docs only mention nodeStorage should be installed and run without saying anything about where in respect to 1999 files.

My best guess is that it is hosted on its own and it makes call to nodeStorage server. I was planning to take apart 1999 AMI to see but haven't had time to confirm this.

scripting commented 8 years ago

No need to guess.

Go to http://1999.io/ and click on Start A Server.

It takes you here...

https://github.com/scripting/1999-project/blob/master/docs/setup.md

Look around that project at other docs and sample code.

Summary: the 1999.io server is nodeStorage.

Dave

donpark commented 8 years ago

I've already read setup.md file and it doesn't mention the files in 1999-project like files in code, defaults, and misc.

Are they used at all by nodeStorage? If so, how does nodeStorage discover them? If not, why are they in the same github repository?

Maybe I'm supposed to point to them from config.json or maybe drag and drop them somewhere.

I am just not seeing how a 'nodeStorage'-based app snaps together. Maybe all this is described somewhere I haven't looked.

scripting commented 8 years ago

Don, take five minutes and follow the instructions in setup.md.

You'll have a running 1999.io server when done.

donpark commented 8 years ago

if 1999.io server is just nodeStorage server then, yes, I had that running already on both OS X and as docker container on Linux although later broke for some reason without any change two days ago which I haven't had time to look into.

scripting commented 8 years ago

Yes. 1999.io server is just nodeStorage. Nothing more.

donpark commented 8 years ago

great, then I just need to figure out what broke in nodeStorage docker image. I did manage to bring down image size from 650MB something to 65MB or so by replacing Ubuntu-based image with Alpine-based image which should help great deal with deployment requirement.

Stay tuned in, I'll look into the issue ASAP.

scripting commented 8 years ago

Don here's a voice memo that explains why there are two repos and what they are about.

It's packed into a zip file because GitHub won't allow an upload of an MP3. ;-)

Dave

toDonRe1999Server.m4a.zip

donpark commented 8 years ago

Thanks for that 'little chat' Dave. Now I understand what's going on. Guess two names for same thing just threw me off trail. haha.