Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p><s>Let me remark first that I think spinning up multiple instances of the same app is a bad design choice. If it is a stop gap measure,</s> here's what I would suggest:</p> <ol> <li><p>Create an archive that can be readily deployed. (Bundle the app, reinstall fibers if necessary, rezip). Deploy (unzip) the archive to a new folder when a new instance is created using a script.</p></li> <li><p>Create a template of an init script and use forever or daemonize or jesus etc to start the site on reboot and keep the sites up during normal operation. See <a href="https://stackoverflow.com/questions/14867703/meteor-deploying-to-a-vm-by-installing-meteor">Meteor deploying to a VM by installing meteor</a> or <a href="https://stackoverflow.com/questions/4903570/how-does-one-start-a-node-js-server-as-a-daemon-process">How does one start a node.js server as a daemon process?</a> for examples. when a new instance is deployed populate the template with new values (i.e. port number, database name, folder). Copy the filled out template to init.d and link to the runlevel. Alternatively, create one script in init.d that executes other scripts to bring up the site.</p></li> <li><p>Each instance should be listening to its own port, so you'll need a reverse proxy. AFAIK, Apache and Nginx require restarts when you change the configuration, so you'll probably want to look at Hipache <a href="https://github.com/dotcloud/hipache" rel="nofollow noreferrer">https://github.com/dotcloud/hipache</a>. Hipache uses redis to store the configuration information. Adding the new instance requires to add a key to redis. There is an experimental port of Hipache that brings the functionality to Nginx <a href="https://github.com/samalba/hipache-nginx" rel="nofollow noreferrer">https://github.com/samalba/hipache-nginx</a></p></li> </ol> <p>What about DNS updates? Once you create a new instance, do you need to add a new record to your DNS configuration?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload