mirror of https://github.com/perkeep/perkeep.git
392 lines
8.1 KiB
JSON
392 lines
8.1 KiB
JSON
{ "_for-emacs": "-*- mode: js2;-*-",
|
|
"handlerConfig": true,
|
|
"baseURL": ["_env", "${CAMLI_BASEURL}"],
|
|
"auth": ["_env", "${CAMLI_AUTH}"],
|
|
"https": ["_env", "${CAMLI_TLS}", false],
|
|
"httpsCert": "config/tls.crt",
|
|
"httpsKey": "config/tls.key",
|
|
"prefixes": {
|
|
"/": {
|
|
"handler": "root",
|
|
"handlerArgs": {
|
|
"ownerName": ["_env", "${USER}-dev"],
|
|
"jsonSignRoot": "/sighelper/",
|
|
"blobRoot": "/bs-recv/",
|
|
"helpRoot": "/help/",
|
|
"statusRoot": "/status/",
|
|
"searchRoot": "/my-search/",
|
|
"shareRoot": "/share/",
|
|
"stealth": false
|
|
}
|
|
},
|
|
|
|
"/hello/": {
|
|
"handler": "app",
|
|
"enabled": ["_env", "${CAMLI_HELLO_ENABLED}"],
|
|
"handlerArgs": {
|
|
"prefix": "/hello/",
|
|
"serverListen": "localhost:3179",
|
|
"program": "hello",
|
|
"appConfig": {
|
|
"word": "world"
|
|
}
|
|
}
|
|
},
|
|
|
|
"/scancab/": {
|
|
"handler": "app",
|
|
"enabled": ["_env", "${CAMLI_SCANCAB_ENABLED}"],
|
|
"handlerArgs": {
|
|
"prefix": "/scancab/",
|
|
"serverListen": "localhost:3179",
|
|
"program": "scanningcabinet",
|
|
"appConfig": {
|
|
"sourceRoot": ["_env", "${CAMLI_DEV_CAMLI_ROOT}/app/scanningcabinet/ui", ""]
|
|
}
|
|
}
|
|
},
|
|
|
|
"/pics/": {
|
|
"handler": "app",
|
|
"enabled": ["_env", "${CAMLI_PUBLISH_ENABLED}"],
|
|
"handlerArgs": {
|
|
"program": "publisher",
|
|
"prefix": "/pics/",
|
|
"serverListen": "localhost:3179",
|
|
"serverBaseURL": ["_env", "${CAMLI_BASEURL}"],
|
|
"appConfig": {
|
|
"camliRoot": "dev-pics-root",
|
|
"sourceRoot": ["_env", "${CAMLI_DEV_CAMLI_ROOT}/app/publisher", ""],
|
|
"cacheRoot": ["_env", "${CAMLI_ROOT_CACHE}"],
|
|
"goTemplate": "gallery.html"
|
|
}
|
|
}
|
|
},
|
|
|
|
"/stub-test-disable/": {
|
|
"handler": "publish",
|
|
"enabled": false,
|
|
"handlerArgs": {
|
|
}
|
|
},
|
|
|
|
"/ui/": {
|
|
"handler": "ui",
|
|
"handlerArgs": {
|
|
"sourceRoot": ["_env", "${CAMLI_DEV_CAMLI_ROOT}", ""],
|
|
"cache": "/cache/",
|
|
"scaledImage": {
|
|
"type": "leveldb",
|
|
"file": ["_env", "${CAMLI_ROOT_CACHE}/thumbnails.leveldb", ""]
|
|
}
|
|
}
|
|
},
|
|
|
|
"/status/": {
|
|
"handler": "status"
|
|
},
|
|
|
|
"/help/": {
|
|
"handler": "help"
|
|
},
|
|
|
|
"/sync-index/": {
|
|
"handler": "sync",
|
|
"handlerArgs": {
|
|
"from": "/bs/",
|
|
"to": ["_env", "${CAMLI_INDEXER_PATH}"],
|
|
"queue": { "type": "memory" },
|
|
"fullSyncOnStart": ["_env", "${CAMLI_FULL_INDEX_SYNC_ON_START}"],
|
|
"blockingFullSyncOnStart": ["_env", "${CAMLI_FULL_INDEX_SYNC_ON_START}"]
|
|
}
|
|
},
|
|
|
|
"/sync-r1/": {
|
|
"handler": "sync",
|
|
"handlerArgs": {
|
|
"from": "/bs/",
|
|
"to": "/r1/",
|
|
"queue": { "type": "memory" }
|
|
}
|
|
},
|
|
|
|
"/sighelper/": {
|
|
"handler": "jsonsign",
|
|
"handlerArgs": {
|
|
"secretRing": ["_env", "${CAMLI_SECRET_RING}"],
|
|
"keyId": ["_env", "${CAMLI_KEYID}"],
|
|
"publicKeyDest": "/bs/"
|
|
}
|
|
},
|
|
|
|
"/bs-recv/": {
|
|
"handler": "storage-replica",
|
|
"handlerArgs": {
|
|
"minWritesForSuccess": 2,
|
|
"backends": ["/bs/", ["_env", "${CAMLI_INDEXER_PATH}"]],
|
|
"readBackends": ["/bs/"]
|
|
}
|
|
},
|
|
|
|
"/cond-unused/": {
|
|
"handler": "storage-cond",
|
|
"handlerArgs": {
|
|
"write": {
|
|
"if": "isSchema",
|
|
"then": "/bs-recv/",
|
|
"else": "/bs/"
|
|
},
|
|
"read": "/bs/"
|
|
}
|
|
},
|
|
|
|
"/bs/": {
|
|
"handler": "storage-blobpacked",
|
|
"handlerArgs": {
|
|
"smallBlobs": "/bs-loose/",
|
|
"largeBlobs": "/bs-packed/",
|
|
"metaIndex": {
|
|
"type": "leveldb",
|
|
"file": ["_env", "${CAMLI_ROOT}/packindex.leveldb"]
|
|
}
|
|
}
|
|
},
|
|
|
|
"/bs-loose/": {
|
|
"handler": "storage-filesystem",
|
|
"handlerArgs": {
|
|
"path": ["_env", "${CAMLI_ROOT}"]
|
|
}
|
|
},
|
|
|
|
"/bs-packed/": {
|
|
"handler": "storage-filesystem",
|
|
"handlerArgs": {
|
|
"path": ["_env", "${CAMLI_ROOT}/packed"]
|
|
}
|
|
},
|
|
|
|
"/cache/": {
|
|
"handler": "storage-filesystem",
|
|
"handlerArgs": {
|
|
"path": ["_env", "${CAMLI_ROOT_CACHE}"]
|
|
}
|
|
},
|
|
|
|
"/sharder/": {
|
|
"handler": "storage-shard",
|
|
"handlerArgs": {
|
|
"backends": ["/s1/", "/s2/"]
|
|
}
|
|
},
|
|
|
|
"/s1/": {
|
|
"handler": "storage-filesystem",
|
|
"handlerArgs": {
|
|
"path": ["_env", "${CAMLI_ROOT_SHARD1}"]
|
|
}
|
|
},
|
|
|
|
"/s2/": {
|
|
"handler": "storage-filesystem",
|
|
"handlerArgs": {
|
|
"path": ["_env", "${CAMLI_ROOT_SHARD2}"]
|
|
}
|
|
},
|
|
|
|
"/repl/": {
|
|
"handler": "storage-replica",
|
|
"handlerArgs": {
|
|
"backends": ["/r1/", "/r2/", "/r3/"],
|
|
"minWritesForSuccess": 2
|
|
}
|
|
},
|
|
|
|
"/r1/": {
|
|
"handler": "storage-diskpacked",
|
|
"handlerArgs": {
|
|
"path": ["_env", "${CAMLI_ROOT_REPLICA1}"]
|
|
}
|
|
},
|
|
|
|
"/r2/": {
|
|
"handler": "storage-filesystem",
|
|
"handlerArgs": {
|
|
"path": ["_env", "${CAMLI_ROOT_REPLICA2}"]
|
|
}
|
|
},
|
|
|
|
"/r3/": {
|
|
"handler": "storage-filesystem",
|
|
"handlerArgs": {
|
|
"path": ["_env", "${CAMLI_ROOT_REPLICA3}"]
|
|
}
|
|
},
|
|
|
|
"/enc/": {
|
|
"handler": "storage-encrypt",
|
|
"handlerArgs": {
|
|
"I_AGREE": "that encryption support hasn't been peer-reviewed, isn't finished, and its format might change.",
|
|
"meta": "/encmeta/",
|
|
"blobs": "/encblob/",
|
|
"metaIndex": { "type": "memory" },
|
|
"keyFile": "config/age.key"
|
|
}
|
|
},
|
|
|
|
"/encmeta/": {
|
|
"handler": "storage-filesystem",
|
|
"handlerArgs": {
|
|
"path": ["_env", "${CAMLI_ROOT_ENCMETA}"]
|
|
}
|
|
},
|
|
|
|
"/encblob/": {
|
|
"handler": "storage-filesystem",
|
|
"handlerArgs": {
|
|
"path": ["_env", "${CAMLI_ROOT_ENCBLOB}"]
|
|
}
|
|
},
|
|
|
|
"/index-memory/": {
|
|
"enabled": ["_env", "${CAMLI_MEMINDEX_ENABLED}"],
|
|
"handler": "storage-index",
|
|
"handlerArgs": {
|
|
"blobSource": "/bs/",
|
|
"storage": {
|
|
"type": "memory"
|
|
}
|
|
}
|
|
},
|
|
|
|
"/index-leveldb/": {
|
|
"enabled": ["_env", "${CAMLI_LEVELDB_ENABLED}"],
|
|
"handler": "storage-index",
|
|
"handlerArgs": {
|
|
"blobSource": "/bs/",
|
|
"storage": {
|
|
"type": "leveldb",
|
|
"file": ["_env", "${CAMLI_DBNAME}", ""]
|
|
}
|
|
}
|
|
},
|
|
|
|
"/index-kv/": {
|
|
"enabled": ["_env", "${CAMLI_KVINDEX_ENABLED}"],
|
|
"handler": "storage-index",
|
|
"handlerArgs": {
|
|
"blobSource": "/bs/",
|
|
"storage": {
|
|
"type": "kv",
|
|
"file": ["_env", "${CAMLI_DBNAME}", ""]
|
|
}
|
|
}
|
|
},
|
|
|
|
"/index-mongo/": {
|
|
"enabled": ["_env", "${CAMLI_MONGO_ENABLED}", true],
|
|
"handler": "storage-index",
|
|
"handlerArgs": {
|
|
"blobSource": "/bs/",
|
|
"storage": {
|
|
"type": "mongo",
|
|
"host": "localhost",
|
|
"database": ["_env", "${CAMLI_DBNAME}"]
|
|
}
|
|
}
|
|
},
|
|
|
|
"/index-mysql/": {
|
|
"enabled": ["_env", "${CAMLI_MYSQL_ENABLED}", true],
|
|
"handler": "storage-index",
|
|
"handlerArgs": {
|
|
"blobSource": "/bs/",
|
|
"storage": {
|
|
"type": "mysql",
|
|
"database": ["_env", "${CAMLI_DBNAME}"],
|
|
"user": "root",
|
|
"password": "root",
|
|
"host": "127.0.0.1"
|
|
}
|
|
}
|
|
},
|
|
|
|
"/index-postgres/": {
|
|
"enabled": ["_env", "${CAMLI_POSTGRES_ENABLED}", true],
|
|
"handler": "storage-index",
|
|
"handlerArgs": {
|
|
"blobSource": "/bs/",
|
|
"storage": {
|
|
"type": "postgres",
|
|
"database": ["_env", "${CAMLI_DBNAME}"],
|
|
"user": "postgres",
|
|
"password": "postgres",
|
|
"host": "127.0.0.1"
|
|
}
|
|
}
|
|
},
|
|
|
|
"/index-sqlite/": {
|
|
"enabled": ["_env", "${CAMLI_SQLITE_ENABLED}", true],
|
|
"handler": "storage-index",
|
|
"handlerArgs": {
|
|
"blobSource": "/bs/",
|
|
"storage": {
|
|
"type": "sqlite",
|
|
"file": ["_env", "${CAMLI_DBNAME}"]
|
|
}
|
|
}
|
|
},
|
|
|
|
"/my-search/": {
|
|
"handler": "search",
|
|
"handlerArgs": {
|
|
"index": ["_env", "${CAMLI_INDEXER_PATH}"],
|
|
"owner": {
|
|
"identity": ["_env", "${CAMLI_KEYID}"],
|
|
"secringFile": ["_env", "${CAMLI_SECRET_RING}"]
|
|
},
|
|
"slurpToMemory": true,
|
|
"devBlockStartupOn": "/sync-index/"
|
|
}
|
|
},
|
|
|
|
"/importer/": {
|
|
"handler": "importer",
|
|
"handlerArgs": {
|
|
"dummy": {
|
|
"clientID": "dummyID",
|
|
"clientSecret": "foobar"
|
|
},
|
|
"flickr": {
|
|
"clientSecret": ["_env", "${CAMLI_FLICKR_API_KEY}", ""]
|
|
},
|
|
"picasa": {
|
|
"clientSecret": ["_env", "${CAMLI_PICASA_API_KEY}", ""]
|
|
},
|
|
"plaid": {
|
|
"clientSecret": ["_env", "${CAMLI_PLAID_API_KEY}", ""]
|
|
},
|
|
"swarm": {
|
|
"clientSecret": ["_env", "${CAMLI_SWARM_API_KEY}", ""]
|
|
},
|
|
"twitter": {
|
|
"clientSecret": ["_env", "${CAMLI_TWITTER_API_KEY}", ""]
|
|
},
|
|
"instapaper": {
|
|
"clientSecret": ["_env", "${CAMLI_INSTAPAPER_API_KEY}", ""]
|
|
}
|
|
}
|
|
},
|
|
|
|
"/share/": {
|
|
"handler": "share",
|
|
"handlerArgs": {
|
|
"blobRoot": "/bs/",
|
|
"index": ["_env", "${CAMLI_INDEXER_PATH}"]
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|