Comparing version 0.2.1 to 0.2.2
@@ -5,3 +5,3 @@ { | ||
"description": "An image server for the Android/iPhone app, MedImage.", | ||
"version": "0.2.1", | ||
"version": "0.2.2", | ||
"bin": { | ||
@@ -8,0 +8,0 @@ "medimage": "bin/server.js" |
@@ -47,5 +47,7 @@ # MedImage Server | ||
For logging or and any permissions issues, see the section 'Troubleshooting' below. | ||
Note: this proxy daemon is always on, but the images are only kept on this machine for a few seconds. | ||
@@ -91,2 +93,47 @@ | ||
## Troubleshooting | ||
Once the server is running, you can check the logs with | ||
``` | ||
pm2 logs | ||
``` | ||
Note: the permissions and ownership of the following files/directories may need to be expanded (try with 'chmod 777' at first, and then restrict the permissions once this is working). | ||
``` | ||
/usr/lib/node_modules/medimage/config.json # must be writable by the sudo node script | ||
/usr/lib/node_modules/medimage/photos | ||
``` | ||
``` | ||
chmod 777 config.json | ||
chown nobody:ubuntu config.json # nobody:ubuntu will vary slightly depending on platform | ||
chmod 777 photos | ||
chown nobody:ubuntu photos | ||
``` | ||
## Upgrade script | ||
The usual way to upgrade medimage server: | ||
``` | ||
sudo npm update -g medimage | ||
pm2 restart server | ||
``` | ||
Here is a sample script for upgrading the version, which is expanded because of a more complex permissions setup. | ||
``` | ||
sudo npm update -g medimage | ||
cd /usr/lib/node_modules/medimage | ||
sudo chmod 777 config.json | ||
sudo chmod 777 photos | ||
chown nobody:ubuntu config.json | ||
chown nobody:ubuntu photos | ||
cp ~/backup_key/atomjump.crt . | ||
cp ~/backup_key/atomjump.private.pem . | ||
pm2 restart server | ||
``` | ||
618283
138