Changeset - 51695693ece7
[Not reviewed]
0 3 1
Jan Kaluza - 10 years ago 2016-02-20 21:58:10
jkaluza@redhat.com
Documentation: Document web_url and web_directory
4 files changed with 50 insertions and 0 deletions:
0 comments (0 inline, 0 general)
documentation/admin.md
Show inline comments
 
@@ -33,24 +33,25 @@ This is Admin documentation for Spectrum 2 transport. If you are user trying to
 

	
 
#### Tutorials
 

	
 
* [XMPP Frontend](frontends/xmpp.html)
 
   * [Spectrum 2 in gateway mode](tutorials/gateway_mode.html)
 

	
 
#### Configuration
 

	
 
* [Configuration file description](configuration/config_file.html)
 
* [MySQL Support](configuration/mysql.html)
 
* [PostgreSQL Support](configuration/postgresql.html)
 
* [Logging](configuration/logging.html)
 
* [Web storage](configuration/web_storage.html);
 

	
 
#### Management
 

	
 
* [spectrum2_manager tool](management/spectrum2_manager.html)
 
* [Web Interface](management/web_interface.html)
 
* [Getting a backtrace](management/getting_backtrace.html)
 
* [Munin integration](management/munin.html)
 

	
 
#### Development
 

	
 
* [Spectrum 2 architecture](development/architecture.html)
 
* [Writing backend in any language (or How the backend works inside)](development/protocol.html)
documentation/backends/libpurple.md
Show inline comments
 
@@ -30,19 +30,23 @@ prpl-novell|Groupwise
 
### Third-party plugins
 

	
 
Spectrum 2 should work with any third-party libpurple plugin which is properly installed. For example, popular plugins:
 

	
 
Protocol variable| website | Description
 
-----------------|------------
 
prpl-facebook| [https://github.com/jgeboski/purple-facebook](website) | Facebook
 
prpl-telegram| [https://github.com/majn/telegram-purple](website) | Telegram
 
prpl-skypeweb| [https://github.com/EionRobb/skype4pidgin/tree/master/skypeweb](website) | Skype
 

	
 
These plugins are included by default in our Docker image.
 

	
 
### Support for Facebook stickers
 

	
 
Facebook stickers are supported using [Web Storage](../configuration/web_storage.html).
 

	
 
### Setting libpurple plugins configurations
 

	
 
Some libpurple protocol plugins allow setting configuration variables. Spectrum 2 passes every variable set in `purple` section to libpurple library. If you need to set such options, you can do it for example like this in your configuration file:
 

	
 
	[purple]
 
	clientlogin=1
 
	ssl=0
documentation/configuration/config_file.md
Show inline comments
 
@@ -30,28 +30,31 @@ title: Spectrum 2
 
>
 
> * [admin_jid](#serviceadminjid)
 
> * [admin_password](#serviceadminpassword)
 
> * [backend](#servicebackend)
 
> * [backend_host](#servicebackendhost)
 
> * [backend_port](#servicebackendport)
 
> * [group](#servicegroup)
 
> * [jid](#servicejid)
 
> * [password](#servicepassword)
 
> * [pidfile](#servicepidfile)
 
> * [user](#serviceuser)
 
> * [users_per_backend](#servicusersperbackend)
 
> * [web_directory](#servicewebdirectory)
 
> * [web_url](#serviceweburl)
 
> * [working_dir](#serviceworkingdir)
 

	
 

	
 

	
 

	
 
### Types of configuration fields
 

	
 
Following types are used:
 

	
 
integer - Examples: key=0
 

	
 
string - Examples: key=something
 

	
 
boolean - Examples: key=0 or key=1
 

	
 
list - List of strings (or Jabber IDs). You can specify this options more than once:
 

	
 
@@ -367,23 +370,52 @@ If you have too big value of users_per_backend, you have just single backend pro
 
as if you have more backends running for the same user-base. Also, if there is some problem with single backend, it will affects only users
 
connected using this particular backend, so it is good idea to have more backends running. However, the more backends you have
 
the more processes the machine has and since some point, it will become less useful. There is also some memory overhead, so if you run
 
500 users on single backend, it will take little bit less memory than 500 users on 5 backends (but it is not significant unless you decide
 
to have hundreds of backends).
 

	
 
If you presume to have just few users on your personal server, it can be useful to configure `service.users_per_backend=1`. Ever user will
 
get his own separated backend process.
 

	
 
For bigger user-base, you have to increase the `service.users_per_backend` value, but there is no optimal value to be suggested yet.
 

	
 

	
 
#### service.web_directory
 

	
 
Key | val
 
----|----
 
Description:|Full path to directory used to save files to which the links are sent to users.
 
Context:|server-mode and gateway-mode
 
Type:|string
 
Default:|
 

	
 
When Spectrum 2 has some image or file for the user and this option is set, the image or file is stored in this directory and
 
and link based on `service.web_url` is sent to the user so he can download the file.
 

	
 
You can read more about this configuration on [Web Storage page](web_storage.html).
 

	
 
#### service.web_url
 

	
 
Key | val
 
----|----
 
Description:|URL on which files in `service.web_directory` are accessible.
 
Context:|server-mode and gateway-mode
 
Type:|string
 
Default:|
 

	
 
When Spectrum 2 has some image or file for the user and this option is set, the image or file is stored in the `service.web_directory` directory and
 
and link based on `service.web_url` is sent to the user so he can download the file.
 

	
 
You can read more about this configuration on [Web Storage page](web_storage.html).
 

	
 

	
 
#### service.working_dir
 

	
 
Key | val
 
----|----
 
Description:|Configures path to directory when Spectrum 2 stores its data files.
 
Context:|server-mode and gateway-mode
 
Type:|string
 
Default:|/var/lib/spectrum2/$jid
 

	
 
This option configures path to directory when Spectrum 2 stores its data files like for example SQLite3 database.
 

	
documentation/configuration/web_storage.md
Show inline comments
 
new file 100644
 
---
 
layout: page
 
title: Spectrum 2
 
---
 

	
 
### Web Storage
 

	
 
Web storage is used to send images and files received by Spectrum 2 to end user. When new image or file is downloaded from the 3rd-party network, it is stored into `service.web_directory` directory
 
and the link to that file, based on `service.web_url`, is sent to the user.
 

	
 
That means that you should configure the web-server on the machine where you run Spectrum 2 to serve `service.web_directory`.
 

	
 
If you for example use httpd, you can configure `service.web_directory=/var/www/html/spectrum2`. In that case, the matching `service.web_url` value will be `service.web_url=http://domain.tld/spectrum2`.
0 comments (0 inline, 0 general)