Skip to content

Commit

Permalink
Documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
azmeuk committed Nov 6, 2020
1 parent dbf1cb1 commit 67be754
Show file tree
Hide file tree
Showing 26 changed files with 623 additions and 96 deletions.
5 changes: 5 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ python39:
stage: test
script: tox -e py39

doc:
image: python:3.9
stage: test
script: tox -e doc

coverage:
image: python:3.9
stage: test
Expand Down
11 changes: 11 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
version: 2
python:
install:
- method: pip
path: .
requirements:
- recommonmark
- sphinx
- sphinx-rtd-theme
- sphinx-issues
34 changes: 0 additions & 34 deletions CHANGES.md

This file was deleted.

42 changes: 42 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
All notable changes to this project will be documented in this file.

The format is based on `Keep a Changelog <https://keepachangelog.com/en/1.0.0/>`_,
and this project adheres to `Semantic Versioning <https://semver.org/spec/v2.0.0.html>`_.

[Unreleased]
============

Added
*****

- Login page is responsive. :issue:`1`
- Adapt mobile keyboards to login page fields. :issue:`2`
- Password recovery interface. :issue:`3`
- User profile interface. :issue:`4`
- Renamed the project *canaille*. :issue:`5`
- Command to remove old tokens. :issue:`17`
- Improved password recovery email. :issue:`14` :issue:`26`
- Use flask `SERVER_NAME` configuration variable instead of `URL`. :issue:`24`
- Improved consents page. :issue:`27`
- Admin user page. :issue:`8`
- Project logo. :pr:`29`

Fixed
*****

- Form translations. :issue:`19` :issue:`23`
- Avoid to use Google Fonts. :issue:`21`

Removed
*******

- 'My tokens' page. :issue:`22`


[0.0.1] - 2020-10-21
====================

Added
*****

- Initial release.
27 changes: 17 additions & 10 deletions CONTRIBUTING.md → CONTRIBUTING.rst
Original file line number Diff line number Diff line change
@@ -1,20 +1,27 @@
# Contribute
Contribute
==========

Contributions are welcome!

## Unit tests
Unit tests
----------

To run the tests, you just need to run `tox`. Everything must be green before patches get merged.

## Style
Style
-----

We use `black` to format our code. Please apply `black` on your patches before submiting them.

## Development environment
Development environment
-----------------------

To try a development environment, you can run the docker image and then open https://127.0.0.1:5000
You can then connect with user *admin* and password *admin* to access an admin account, or user *user* and password *user* for a regular one.

```bash
cp canaille/conf/config.sample.toml canaille/conf/config.toml
cp canaille/conf/oauth-authorization-server.sample.json canaille/conf/oauth-authorization-server.json
cp canaille/conf/openid-configuration.sample.json canaille/conf/openid-configuration.json
docker-compose up
```
.. code-block:: console
cp canaille/conf/config.sample.toml canaille/conf/config.toml
cp canaille/conf/oauth-authorization-server.sample.json canaille/conf/oauth-authorization-server.json
cp canaille/conf/openid-configuration.sample.json canaille/conf/openid-configuration.json
docker-compose up
File renamed without changes.
63 changes: 11 additions & 52 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,59 +12,18 @@ It aims to be very light, simple to install and simple to maintain. Its main fea
- No additional database required. Everything is stored in your LDAP server;
- The code is easy to read and easy to edit.

## Install
# Screenshots

⚠ Canaille is under heavy development and may not fit a production environment yet. ⚠

First you need to install the schemas into your LDAP server. There are several ways to achieve this:

### LDAP schemas

As of OpenLDAP 2.4, two configuration methods are available:
- The [deprecated](https://www.openldap.org/doc/admin24/slapdconf2.html) one, based on a configuration file (generally `/etc/ldap/slapd.conf`);
- The new one, based on a configuration directory (generally `/etc/ldap/slapd.d`).

Depending on the configuration method you use with your OpenLDAP installation, you need to chose how to add the canaille schemas:

#### Old fashion: Copy the schemas in your filesystem

```bash
test -d /etc/openldap/schema && sudo cp schema/* /etc/openldap/schema
test -d /etc/ldap/schema && sudo cp schema/* /etc/ldap/schema
sudo service slapd restart
```

#### New fashion: Use slapadd to add the schemas

```bash
sudo slapadd -n0 -l schema/*.ldif
sudo service slapd restart
```

### Web interface

Then you can deploy the code either by copying the git repository or installing the pip package:

```bash
pip install canaille
```

Finally you have to run the website in a WSGI server:

```bash
pip install gunicorn
gunicorn "canaille:create_app()"
```

## Recurrent jobs

You might want to clean up your database to avoid it growing too much. You can regularly delete
expired tokens and authorization codes with:
<div align="center">
<img src="doc/_static/login.png" width="225" alt="Canaille" />
<img src="doc/_static/consent.png" width="225" alt="Canaille" />
<img src="doc/_static/profile.png" width="225" alt="Canaille" />
</div>

```
env CONFIG=/path/to/config.toml FASK_APP=canaille flask clean
```
# Documentation

# Contribute
⚠ Canaille is under heavy development and may not fit a production environment yet. ⚠

Want to contribute? Take a look on [CONTRIBUTING.md](CONTRIBUTING.md).
- Please have a look on our [documentation](https://canaille.readthedocs.io>);
- To **install** canaille, just take follow the [installation guide](https://canaille.readthedocs.io/install.html);
- To **contribute** canaille, please read the [contribution guide](https://canaille.readthedocs.io/contributing.html>).
Empty file added doc/__init__.py
Empty file.
Binary file added doc/_static/canaille-c.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 24 additions & 0 deletions doc/_static/canaille-c.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/_static/canaille-full.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
151 changes: 151 additions & 0 deletions doc/_static/canaille-full.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/_static/canaille-head.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 67be754

Please sign in to comment.