This node aims to document the overall way the site functions and changes to the codebase update production.
Sub nodes appropriate for this article include Testing, Meteor, stats/metrics, and other infrastructure appropriate for modern webapps. Testing is currently an area identified for work.
CodebaseThe codebase is hosted on github. https://github.com/focallocal/fl-maps
There are two branches, master and fl-sleeper. This is messay and needs to be cleaned up at some point. Andy has plans for how the branches diverge, that'll be a later question.
A PR to master/sleeper triggers a Travis CI build that checkouts the latest version of the codebase, decrypts the secrets to log into the server, and runs a deployment configured in mup.js.
Command to tar:
tar -czvf secrets.tar mup.js settings.json
Command to encrypt:
openssl aes-256-cbc -a -salt -in secrets.tar -out secrets.tar.enc
Command to untar:
tar -xvf secrets.tar
Command to decrypt:
openssl enc -d -aes-256-cbc -md md5 -in secrets.tar.enc -out secrets.tar
Encryption/Decryption keys are with @tmcnulty.
Builds to root URL of http://focallocal.org
Configured with mup.js ([Meteor Up](http://meteor-up.com/docs.html) within secrets.tar.enc.
fl-sleeper[GitHub link](https://github.com/focallocal/fl-maps/tree/fl-sleeper) Builds to root url https://brightertomorrowmap.com
DatabasesDatabases are hosted as very small sandbox instances on mlab.com.
These are backed up to flat file by a cron on the production app box.
We currently have no need to expand the databases, or make decisions in routing requests or ensuring high availability.
Given they’re mongo instances we’ll have to cross that bridge when we get there but the majority of the configuration and schema is done by the logic within the application.
As number of items within the schema grow we will need to figure out a way of manipulating objects, namely deleting them, as there’s no way for the application to do that currently.
This is something solved sooner rather than later, less it become impossible to remove things for some reason.