-
Notifications
You must be signed in to change notification settings - Fork 49
Settings
You can configure runtime behavior of PeerLibrary through Meteor.settings and environment variables.
For settings, create a settings.json
file with one or more fields you want to configure, and pass it when running mrt
, like:
mrt --settings=settings.json
Name of the PeerLibrary installation.
{
"public": {
"siteName": "PeerLibrary"
}
}
Is this a production instance. For example, it removes the red "development instance" banner on the index page.
{
"public": {
"production": false
}
}
The debug mode currently does not do much, just shows how Meteor is redrawing browser content. So unless you are trying to optimize PeerLibrary browser content redrawing performance, there is no need to run in the debug mode.
{
"public": {
"debug: {
"rendering": false
}
}
}
What is set as a sender for emails send by PeerLibrary?
{
"from": "PeerLibrary <no-reply@peerlibrary.org>"
}
Is a sender for emails a no-reply e-mail address. Default is false
if from
is set, otherwise true
.
{
"fromNoReply": false
}
List of IDs of example publications which are used to showcase PeerLibrary.
{
"public": {
"examples": []
}
}
To sync arXiv PDF cache you will need you will need AWS account transfer costs will be billed against. Here you can configure your access key and secret.
{
"AWS": {
"accessKeyId": "<...>",
"secretAccessKey": "<...>"
}
}
Free Speech Movement API app ID and key.
{
"FSM": {
"appId": "<...>",
"appKey": "<...>"
}
}
Some crypto operations need secret seed. This is this key. It should be simply a long string of random characters.
{
"secretKey": "<...>"
}
Connect PeerLibrary to Kadira monitoring dashboard. App ID and secret.
{
"kadira": {
"appId": "<...>",
"appSecret": "<...>"
}
}
If you want that admin user is created automatically at the first run, you can configure password here. You can also set sampleData
to true
to automatically populate installation with sample data.
{
"autoInstall": {
"password": "<...>",
"sampleData": false
}
}
PeerLibrary allows exposing email addresses of registered users in a way which is then possible to source into Sympa, a mailing list manger. See necessary Sympa configuration. To enable that you have to set HTTP basic authentication username and password. Use HTTPS to protect username and password.
{
"sympa": {
"username": "<...>",
"password": "<...>"
}
}
PeerLibrary allows you to display the latest blog post from your Tumblr blog on the index page. To enable that, you need to configure:
- Your blog URL as a public setting
- Your blog hostname
-
Tumblr API key, register a Tumblr app and use your OAuth Consumer Key as your
apiKey
{
"public": {
"blogUrl": "<...>"
},
"tumblr": {
"apiKey": "<...>",
"baseHostname": "<...>"
}
}
Environment variables can be set by export
ing them before running mrt
, or prepending them before, like:
ROOT_URL=https://peerlibrary.org mrt
To configure through which SMTP server PeerLibrary is sending e-mail, set MAIL_URL environment variable.
MAIL_URL=smtp://<username>:<password>@<host>:<port>
Configure where the PeerLibrary is running:
ROOT_URL=https://peerlibrary.org
If you are running multiple instances of PeerLibrary to distribute PeerDB load, configure number of PeerDB instances here. Suggested setting is that your web-facing instances disable PeerDB by setting PEERDB_INSTANCES
to 0
, and then you have dedicated PeerDB instances.
PEERDB_INSTANCES=1
If you are running multiple PeerDB instances, which instance is this? It is zero-based index so if you configured PEERDB_INSTANCES=2
, you have to have two instances, one with PEERDB_INSTANCE=0
and another with PEERDB_INSTANCE=1
.
PEERDB_INSTANCE=0
If you want migrations to not run, set PEERDB_MIGRATIONS_DISABLED
to a true value. Recommended setting is that only one web-facing instance has migrations enabled and all other, including PeerDB instances, have them disabled. This prevents any possible conflicts which could happen because of running migrations in parallel.
PEERDB_MIGRATIONS_DISABLED=
When running multiple instances you want to connect them all to the same database. You have to configure both normal MongoDB connection and also oplog connection. You can use your own MongoDB instance or connect to one provided by running Meteor in development mode. In the latter case the recommended way is that one web-facing instance runs MongoDB and all other instances connect to that MongoDB.
MONGO_OPLOG_URL=mongodb://127.0.0.1:3001/local
MONGO_URL=mongodb://127.0.0.1:3001/meteor
To configure for how many worker instances given instance should configure for, set WORKER_INSTANCES
. Probably you want all instances except worker instances themselves to have WORKER_INSTANCES
set to 0
(to disable worker logic at that instance) and then on worker instances you set WORKER_INSTANCES
to the number of worker instances you have, so that they split work accordingly.
WORKER_INSTANCES=1
If you want Meteor to exit immediately after startup, set EXIT_ON_STARTUP
to true. This is useful if you just want to make sure all dependencies and NPM packages are installed before running.
EXIT_ON_STARTUP=
By default files created by PeerLibrary (like cached PDFs, thumbnails generated, etc.) are stored under .meteor/storage/
directory inside PeerLibrary root directory. You can configure other location by setting STORAGE_DIRECTORY
.
STORAGE_DIRECTORY=
Recommended is that you are running node.js installation which is bundled with Meteor. You can configure your PATH
to use it with precedence.
PATH=~/.meteor/tools/latest/bin:$PATH
And similar for node.js modules path.
NODE_PATH=~/.meteor/tools/latest/lib/node_modules
pdf.js requires on the server side packages which have to be compiled natively. You might have to tell the compilation step where to find pkgconfig
definitions with PKG_CONFIG_PATH
. Default is to add /opt/X11/lib/pkgconfig
to the list, which should help make things work on Mac OS X.
PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/opt/X11/lib/pkgconfig
There are other environment variables you can use to configure Meteor, node.js, or various packages.
This is development wiki. We also have outreach wiki.