ui: update doc for sib-manager

This commit is contained in:
Jean-Baptiste Pasquier 2019-05-09 15:05:33 +02:00
parent 0f5b0ed8e5
commit 31d1e68876
No known key found for this signature in database
GPG Key ID: F2702E6D22ED4D62
1 changed files with 10 additions and 26 deletions

View File

@ -28,7 +28,8 @@ $ pip3 install -U sib-manager
#### `sib-manager` deploy
```
$ sib startproject sibserver -m djangoldp_project -m oidc_provider:django-oidc-provider -m djangoldp_circle -m djangoldp_joboffer -m djangoldp_profile -m djangoldp_skill -m djangoldp_account -m djangoldp_notification -m djangoldp_conversation --venv
$ sib startproject newserver -m djangoldp_project -m oidc_provider@django-oidc-provider -m djangoldp_circle -m djangoldp_joboffer -m djangoldp_profile -m djangoldp_skill -m djangoldp_account -m djangoldp_notification -m djangoldp_conversation
$ sib initproject newserver
```
We're using
@ -44,47 +45,30 @@ We're using
As dependencies, if you don't want them, just remove the `-m packagename`.
The `--venv` mean that `sib-manager` will create and use a virtual env, if you want to use your system env remove it.
`sibserver` is the name of the folder that `sib-manager` will create, choose it wisely.
In addition to the `startproject` you can add :
- `--site-url "http://localhost:8000"`
- `--production` to use postgresql instead of sqlite
- `--db-host`, `--db-name`, `--db-user` and `--db-pass` are used to configure the database (mandatory with `--production`)
- `--smtp-host`, `--smtp-user` and `--smtp-pass` are used to configure the SMTP (optional)
#### `sibserver` configuration
You'll have to change some settings on the `sibserver` files.
- Change `oidc_provider` from `packages.py` to `settings.py`:
- Remove `oidc_provider` line in `./sibserver/packages.py`
- Add `oidc_provider` on `INSTALLED_APPS` in `./sibserver/settings.py`
- Add your server name to `ALLOWED_HOSTS`
- In `settings.py`, add your hostname on `ALLOWED_HOSTS`, eg:
```
ALLOWED_HOSTS = ['api.myserver.com', 'localhost']
```
- Around line `75-79` of `settings.py` set your `PROSODY_HTTP_URL`, `JABBER_DEFAULT_HOST` & `BASE_URL`, eg:
- Around line `96-97` of `settings.py` set your `PROSODY_HTTP_URL`, `JABBER_DEFAULT_HOST`, eg:
```
PROSODY_HTTP_URL = 'https://jabber.happy-dev.fr'
JABBER_DEFAULT_HOST = 'happy-dev.fr'
BASE_URL = 'https://localhost:8000'
```
- If you wish use another database than `sqlite`, you can also configure it on `DATABASES` in `settings.py`
- If you want to receive mails from notifications, you need to add these lines & configure them at the end of `settings.py`
```
EMAIL_HOST = "your.smtp.srv"
EMAIL_HOST_USER = "user@email.com"
EMAIL_HOST_PASSWORD = "password"
EMAIL_USE_TLS = True #Or False
```
#### `sibserver` migrate
On the first `sibserver` folder:
```
$ ./manage.py migrate
```
#### Add an RSA Key for `oidc`
On the first `sibserver` folder: