In our experience a virtual machine with 2GB of RAM and at least 20GB of free storage space is appropriate to comfortably run most Apostrophe sites. MongoDB requires that a minimum of 5GB of free disk space be maintained at all times. Apostrophe's node process and MongoDB will complete for scarce memory on a server with 1GB of RAM.
Disk space requirements will increase if users routinely upload large files to the media library.
Sites running in a multicore configuration will require additional RAM and, of course, CPU cores.
You will need (STOP: use the package manager of your operating system! Do NOT install everything from source code!)
- nodejs version 0.10 or better
- mongodb (version 2.6 or better required)
- imagemagick (the command line utilities
- nginx (or another frontend proxy server)
- mechanic (recommended; manages nginx)
You may also want:
- postfix, or another email delivery agent
For CentOS 7 or Red Hat Enterprise 7 Linux, these commands will get you there:
# Grab some command line basics yum install wget rsync perl git nano # Allow the use of the EPEL ("Extra Packages for Enterprise Linux") repository yum install epel-release # Front end proxy webserver yum install nginx # Install node, imagemagick, npm, and compiler tools so an efficient # mongo driver can be compiled by npm yum install gcc automake autoconf libtool make nodejs ImageMagick npm # Install mongodb yum install mongodb-server mongodb # Allow non-root users to run command line applications installed with # "npm install -g", otherwise it is not very useful chmod -R a+r /usr/lib/node_modules/ # Used to run things indefinitely restarting as needed npm install -g forever # Used to manage nginx npm install -g mechanic
Now you're ready to install the stagecoach deployment system and deploy your Apostrophe site. Continue by reading the stagecoach documentation.
Once deployment is complete, you're ready to start welcoming traffic to your website. See the mechanic documentation for how to painlessly configure nginx as your reverse proxy. Or, if you wish, you can configure any reverse proxy of your choice to forward traffic on port 3000 to your Apostrophe site. You can support multiple sites on a single server; stagecoach assigns each one a distinct port. See the text file
/opt/stagecoach/apps/MYAPPNAME/current/data/port for the port number.
Because node is asynchronous, these single-server, single-core instructions are quite adequate for most clients, including many sites with high traffic at the city scale. However, if performance does become an issue, you may want to check out running Apostrophe on multiple cores and/or servers as well. Just be sure to master the above material first.