As this script is part of the box repo, it is actually not intended to be run from here, but we need to store it somewhere for now. The idea is to copy it to a pristine ubuntu droplet, run it and then create a new base image for cloudrons off of that droplet.
The Box
Development setup
-
sudo adduser yellowtent ** This dummy user is required for supervisor 'box' configs
-
rmappdir.sh should be callable without a password ** Add a file called /etc/sudoers.d/yellowtent with the following contents: Defaults!/home/girish/yellowtent/box/src/rmappdir.sh env_keep=HOME girish ALL = (ALL) NOPASSWD: /home/girish/yellowtent/box/src/rmappdir.sh Defaults!/home/girish/yellowtent/box/src/reloadnginx.sh env_keep=HOME girish ALL = (ALL) NOPASSWD: /home/girish/yellowtent/box/src/reloadnginx.sh
(replace the username and path to rmappdir.sh to match your environment)
You might have to clear the sudo cache using sudo -k.
** Verify using sudo rmappdir.sh --check. This should print 'OK'
** Verify using sudo reloadnginx.sh --check. This should print 'OK'
- export FQDN='mybox.cloudron.us' ** Add the above domain to your /etc/hosts ** All apps will be installed as subdomains of the above FQDN
Running
-
./run.sh - this starts up nginx to serve up the webadmin ** https://HOSTNAME should now be accessible ** Do not use https://localhost. It will appear to work work but will break oauth redirection
-
DEBUG=box:* ./app.js - this the main box code ** NODE_ENV is set to production by default