95 lines
2.7 KiB
Markdown
95 lines
2.7 KiB
Markdown
This repository holds the code for the website of the
|
||
[XMPP] service at [chat.phryk.net]. It interfaces to
|
||
any webserver via [WSGI].
|
||
|
||
|
||
## Features ##
|
||
|
||
* Implements invite-based registrations
|
||
* Interfaces with [Prosody], specifically [mod_invites_register_api]
|
||
* Offers dynamically generated installation/registration guides for every
|
||
defined OS/client combination.
|
||
* Provides [ConverseJS] web-based XMPP client as fallback
|
||
* Renders markdown articles
|
||
* SCSS integration
|
||
* looks spiffy, but has no JS except for Converse
|
||
|
||
|
||
## Dependencies ##
|
||
|
||
* [Prosody] >= 0.11
|
||
* [Python] >= 3.6
|
||
* [Flask]
|
||
* [BeautifulSoup4]
|
||
* [python-markdown]
|
||
* [pySCSS]
|
||
* [requests]
|
||
* [ConverseJS]
|
||
|
||
What you *don't* need is a database. :)
|
||
|
||
|
||
## Future Plans ##
|
||
|
||
Code is currently a wee bit messy and not terribly well suited
|
||
to customization. This is supposed to change in order to make
|
||
it easier for others to set up invite-based XMPP services.
|
||
|
||
In particular, we want to:
|
||
|
||
* Make the site easily extensible (routes, assets, content – the works)
|
||
* Make all integrated templates and assets overridable
|
||
* Make the whole thing a bit cleaner
|
||
* Add CLI command to automatically pull ConverseJS resources
|
||
* Package the whole thing for easy installation
|
||
|
||
|
||
## Deployment ##
|
||
|
||
No time to write a proper guide.
|
||
|
||
For now, you can check out Flasks [deployment docs] if you get stuck.
|
||
|
||
You need:
|
||
|
||
* A config.py (look at config.py.sample)
|
||
* An HTTP server, commonly [nginx] or [Apache]
|
||
* Something that talks [WSGI]
|
||
* The contents of this repository
|
||
|
||
If you use [nginx], use [uwsgi] to run the app. Read their docs, try this .ini:
|
||
|
||
```
|
||
chdir = /path/to/xmpp-site
|
||
|
||
# unix socket uwsgi listens on
|
||
socket = /tmp/xmpp-site.sock
|
||
|
||
wsgi = main:app
|
||
```
|
||
|
||
Hook it up to [nginx] via [uwsgi_pass].
|
||
|
||
If you use [Apache], we have no idea, read the docs of [mod_wsgi].
|
||
The WSGI application object is `app` in `main.py`.
|
||
|
||
|
||
[chat.phryk.net]: https://chat.phryk.net/
|
||
[XMPP]: https://xmpp.org/
|
||
[Prosody]: https://prosody.im/
|
||
[mod_invites_register_api]: https://modules.prosody.im/mod_invites_register_api
|
||
[Python]: https://python.org/
|
||
[Flask]: https://flask.palletsprojects.com/
|
||
[BeautifulSoup4]: https://www.crummy.com/software/BeautifulSoup/
|
||
[python-markdown]: https://python-markdown.github.io/
|
||
[pySCSS]: https://github.com/Kronuz/pyScss
|
||
[requests]: https://requests.readthedocs.io/en/latest/
|
||
[ConverseJS]: https://conversejs.org/
|
||
[deployment docs]: https://flask.palletsprojects.com/en/2.1.x/deploying/
|
||
[WSGI]: https://en.wikipedia.org/wiki/Web_Server_Gateway_Interface
|
||
[nginx]: https://nginx.org/
|
||
[uwsgi]: https://uwsgi-docs.readthedocs.io/en/latest/
|
||
[uwsgi_pass]: https://nginx.org/en/docs/http/ngx_http_uwsgi_module.html#uwsgi_pass
|
||
[Apache]: https://httpd.apache.org/
|
||
[mod_wsgi]: https://modwsgi.readthedocs.io/en/master/
|