Commit Graph

11 Commits

Author SHA1 Message Date
Johannes Zellner 6fe11f869a Do not depend on os.hostname() for fqdn
The non provisioned boxes will always be configured
to work on localhost. This includes the webadmin OAuth
records. After the cloudron gets provisioned, the FQDN
will be set to the correct value, which requires regeneration
of the OAuth client records.
2014-08-19 22:05:50 -07:00
Girish Ramakrishnan b0139a3be0 pidfile and logfile are required for ubuntu scripts 2014-08-07 15:43:25 -07:00
Girish Ramakrishnan b6be2997f3 Fix logs
fixes #54
2014-08-06 19:35:34 -07:00
Johannes Zellner a64337d0c9 Put childprocess logs into /var/log
The default is /tmp. logrotation will happen
automatically done by supervisor
2014-06-23 08:19:41 -07:00
Johannes Zellner 362d8bea5f Enable full debugging output for now on the cloudrons 2014-06-21 01:20:09 -07:00
Johannes Zellner 8c2bc69cfd Setup box process environment to run as different user
Supervisor does not spawn a shell to run the application,
thus the process environment of supervisord will be inherited.
This can be overridden with 'environmen=...' in the config file
2014-06-18 23:37:07 -07:00
Johannes Zellner 440e42fe98 Run box as user 'yellowtent' 2014-06-18 22:49:41 -07:00
Johannes Zellner f3dd285c6c Run box from withing the project root dir
The box root dir (NGINX_ROOT) is provided either via run.sh
or /etc/default/supervisor
2014-06-18 22:11:15 -07:00
Girish Ramakrishnan 6b2aafa699 Pass nginx path using env variable
%(ENV_xxx)s is the magic incantation for supervisor config files.
Sadly this works only on specific fields.
2014-06-04 14:01:07 -07:00
Johannes Zellner f67e235b06 Use supervisor for the box application 2014-06-04 10:27:02 -07:00
Girish Ramakrishnan 41bc074793 Run nginx through supervisor
One of the motivations for this is to allow the node code to restart
nginx once the nginx config files have been written out. Without
supervisor, the app code needs to be root. With supervisor, we can
just ask supervisor to restart it for us (which helpfully listens
for commands in a tcp port 9001).

The supervisor configs are crude and need to somehow use environment
variables for log file paths and such. %(ENV)s format is supposed to
work but doesn't.

supervisor is not a daemon because it's easy to start/stop it through
run.sh (and Ctrl+C) works nicely during development. We can possibly
run it as a daemon once supervisor configs are more stable.

nginx is not a daemon anymore because it is run through supervisor.

supervisorctl seems to magically connect to supervisor even without
passing it -c <conf> file. Not sure how that works.
2014-06-03 22:23:30 -07:00