Commit Graph

31 Commits

Author SHA1 Message Date
Kim Alvefur
c79fbcbef1 Remove unused variable along with DNS tooling 2025-07-18 13:39:46 +02:00
Matthew Wild
b6849b8060 Updates for Prosody trunk (~13.0)
Notable changes:

 - OAuth2 now requires client authentication for the password grant type (see
   related changes in snikket-web-portal)
 - Invitations page support is now built into mod_invites, we just need to
   tell it that Snikket's page supports password resets
 - mod_account_activity provides a built-in way to record last account
   activity time, and removes the need for the mod_lastlog2 community module

The --admin option for mod_invites is broken in the current Prosody snapshot.
A fix has been committed already, and will be included in the next nightly
build (which I'm sure we'll update to before a snikket-server release).
2025-06-02 13:08:11 +01:00
Matthew Wild
f89e01402b entrypoint.sh: Migrate data stores before any other migrations
The migration code checks that the migration hasn't already happened (e.g. by
testing whether prosody.sqlite exists). However we do various other operations
before this point (via prosodyctl) which may initialize the new data store of
the desired type.

If this happens, the migration code will assume that a migration already
happened and skip the migration.

This changes the order to ensure data store migrations always happen first,
and adds a comment to inform future devs about this potential issue.
2024-08-12 14:48:02 +01:00
Matthew Wild
ec6e79ef95 IDN support 2024-03-29 18:02:02 +00:00
Matthew Wild
b52e04e8a4 entrypoint: Migrate old role names at startup 2024-01-11 13:26:33 +00:00
Kim Alvefur
4f45b0eaaf Add support for moving data to/from SQLite
Fixes #47

This allows configuring the Prosody storage module to use between the
current default of 'internal' and 'sql' with SQLite, including automatic
migration between the two. This allows those who wish to opt-in as well
as easy testing and evaluation of SQLite as future default with a chance
to go back if it does not live up to expectations.
2023-11-06 09:12:53 +01:00
Matthew Wild
d7a5c5acc7 Switch to s6 for process init and supervision 2023-10-19 19:35:50 +00:00
Jonas Schäfer
470f2ee550 Migrate roles to new format on start 2023-03-30 19:06:44 +02:00
Kim Alvefur
37f2af4acd Switch to mod_http_file_share
More future-proof, allowing for larger uploads.
2021-07-31 21:05:09 +02:00
Matthew Wild
bf2fccf585 Dockerfile: Move to top-level for consistency with our other projects 2021-05-28 14:26:56 +01:00
Matthew Wild
173ca8b0c9 Add lua-unbound for more robust DNS resolution 2021-03-15 19:55:33 +00:00
Matthew Wild
c4a8a88028 docker: Remove obsolete letsencrypt things (moved to cert-manager) 2021-03-09 15:28:09 +00:00
Kim Alvefur
2ad719122d Add docker healthcheck for docker ps output
Mostly to improve the docker ui, ie it will say "unhealthy" if it takes
too long to start e.g. waiting for certs, or if Prosody crashes without
getting restarted.

Probes the http port on the assumption that this means Prosody is up and
running.

Signed-off-by: Matthew Wild <mwild1@gmail.com>
2021-02-23 15:27:12 +00:00
Matthew Wild
4278cc055f docker: Ensure SNIKKET_ADMIN_EMAIL is also set 2021-01-29 17:36:04 +00:00
Matthew Wild
68e29c5ac4 docker: Remove www dir from image 2021-01-22 17:25:03 +00:00
Matthew Wild
13bddf20d4 docker: unexplained fix required for building on ARM 2020-11-11 16:40:35 +00:00
Kim Alvefur
ffa5d0e24c
Improve efficiency of random secret generation
Reading untold amounts of data and throwing away all except \~86% seems
wasteful.

This method reads exactly 32 bytes from /dev/urandom, while the previous
method would have stuffed pipes full before finding 32 bytes in the
specified range. All of the entropy of those 32 bytes are also kept in
the base64 form, although this is probably insane overkill.
2020-05-21 17:57:26 +02:00
Matthew Wild
ec33e74684 ansible, docker: Improve turnserver secret generation
The original implementation unintentionally included whitespace
and other noise in the secret file.

The new secret is stored in a -v2 file, the old one is cleaned up
if present.
2020-05-21 16:24:29 +01:00
Matthew Wild
7aa2468099 docker: Switch default BUILD_SERIES to dev 2020-05-13 13:57:22 +01:00
Matthew Wild
7f128e4672
Merge pull request #6 from snikket-im/coturn
Add STUN/TURN support
2020-05-13 12:05:15 +01:00
Matthew Wild
0793106447 Flesh out coturn config, autodiscover external IP 2020-05-12 15:10:59 +01:00
Matthew Wild
166e000b12 docker-compose, prosody: Switch to host networking for the container
This simplifies things in preparation for adding coturn and its large
number of ports.

As Prosody now must listen on the "real" HTTP ports, we had to give
permission to the Lua binary to bind low network ports.
2020-05-12 15:05:42 +01:00
Matthew Wild
88402bb73f ansible, docker: Initial attempt at adding coturn 2020-04-29 22:39:27 +01:00
root
7dad6e64e1 Docker: fixed stop signal not reaching process 2020-03-05 18:08:13 +01:00
Matthew Wild
68dbcce19b Create .well-known/acme-challenge with correct perms at startup 2020-02-21 20:36:07 +00:00
Matthew Wild
3c3c2d34ab chown letsencrypt files at startup to ensure correct permissions 2020-02-21 16:57:56 +00:00
Matthew Wild
c30b7310aa Add support for PUID/PGID and create necessary directories in /snikket
This is useful when e.g. mounting an existing directory instead of a
docker-managed volume.
2020-02-20 22:00:14 +00:00
Matthew Wild
3e5f7203e2 docker: Fix version file path 2020-02-01 05:30:17 +00:00
Matthew Wild
5c66949ccf Move Dockerfile back 2020-01-31 14:01:03 +00:00
Matthew Wild
63a028a4be Maybe moving the Dockerfile will help? 2020-01-31 13:54:50 +00:00
Matthew Wild
d6157c6a15 Initial commit 2020-01-31 13:46:46 +00:00