-
Notifications
You must be signed in to change notification settings - Fork 13
Home
Welcome to the Cozy Light wiki! You will find here assistance and explanation on how to augment your Cozy Light via plugins or apps.
It's a client/server app that uses PouchDB as a database storage. There the application used the database given by the platform to store data. They are more complex than HTML5 apps, but it can provide more capabilities like sending email or indexation. It supports only Node.js applications.
Build your Classic App tutorial
Port your Cozy App to Cozy Light
They are serverless applications. They are only made of static files (HTML, JS, images, etc.). It can be games or app embedding a PouchDB instance that replicates data from the Cozy Light main database. They are the easiest application to develop.
Port you Cozy App to Cozy Light
They are apps running via a Docker container. It requires that your Cozy Light has enough rights to use your Docker instance. That apps can be written with any language and use any database you want. The drawbacks are that they do not share a database and that this configuration is not lightweight anymore.
Build your Docker App tutorial
Plugins allow to extend your Cozy Light capabilities by adding feature like authentication, REST API to access to the PouchDB instance, etc. The aim is to make Cozy Light highly customisable, so it could fit with many needs. Usage exemple:
- Simple reverse proxy for your apps.
- Light Personal cloud
- Video games console
- File storage
- ...
Install Node.js on the Raspberry Pi Tutorial
To make it short:
sudo su -
cd /opt
wget http://nodejs.org/dist/v0.10.26/node-v0.10.26-linux-arm-pi.tar.gz
tar xvzf node-v0.10.26-linux-arm-pi.tar.gz
ln -s node-v0.10.26-linux-arm-pi node
chmod a+rw /opt/node/lib/node_modules
chmod a+rw /opt/node/bin
echo 'PATH=$PATH:/opt/node/bin' > /etc/profile.d/node.sh
Following information are only true for classical apps.
Actions performed on app installation:
- Clone of the Github repository via NPM
- Fetch of dependencies via NPM
- Module is located in ~/.cozy-light/node_modules
- Update of the configuration file by adding an entry for the app with the manifest information
Actions performed on app uninstallation:
- Deletion of the module repository via NPM uninstall command.
- Removal of the app information from the configuration file.
An app is started via its index.start
method. Here are the given parameters:
- db: It's the PouchDB database, that way apps share the same datastore.
- port: the port on which app will listen (generated automatically by the platform with simple incrementation).
- silent: Set to true to make the app logging silent if the app supports that option.
Actions performed on plugin installation:
- Clone of the Github repository via NPM
- Fetch of dependencies via NPM
- Module is located in ~/.cozy-light/node_modules
- Update of the configuration file by adding an entry for the plugin with the manifest information
Actions performed on app uninstallation:
- Deletion of the module repository via NPM uninstall command.
- Removal of the plugin information from the configuration file.
TODO
TODO
Configuration got entries for apps, plugins and attributes. Here is an exemple of configuration file with one app, one plugin and one attribute:
{
"port": 80,
"apps": {
"cozy-labs/webmail": {
"name": "webmail",
"displayName": "Webmail",
"version": "0.6.8",
"description": "Emails Web Client based on Node.js and React.js",
"type": "classic"
}
},
"plugins": {
"cozy-labs/cozy-light-simple-dashboard": {
"name": "cozy-light-simple-dashboard",
"displayName": "Simple Dashboard",
"version": "0.1.0",
"description": "Minimalist dashboard for Cozy Light."
}
}
}
On a configuration file change (detected via fs.watch
), the platform is restarted.
If you want additional details, ask to the community : https://forum.cozy.io