forked from mirror/prosody
Compare commits
3 commits
Author | SHA1 | Date | |
---|---|---|---|
|
b6af9f8cb5 | ||
|
d1db0837ec | ||
|
2173f8eff3 |
7 changed files with 44 additions and 2 deletions
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
## Unreleased
|
## Unreleased
|
||||||
|
|
||||||
* Nothing
|
* Added modules that allow invite-based account registration for Prosody. See also [Great Invitations](https://blog.prosody.im/great-invitations/).
|
||||||
|
|
||||||
## v1.2.0
|
## v1.2.0
|
||||||
|
|
||||||
|
|
15
Dockerfile
15
Dockerfile
|
@ -23,10 +23,16 @@ LABEL org.opencontainers.image.vendor="Sara Smiseth"
|
||||||
LABEL org.opencontainers.image.version="${VERSION}"
|
LABEL org.opencontainers.image.version="${VERSION}"
|
||||||
LABEL prosody.version="${PROSODY_VERSION}"
|
LABEL prosody.version="${PROSODY_VERSION}"
|
||||||
|
|
||||||
|
# TODO just for mod_invites, makes the image from 90MB to 150MB, just do it like this?
|
||||||
|
#libjs-bootstrap4
|
||||||
|
#libjs-jquery
|
||||||
|
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y \
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -y \
|
||||||
libevent-dev `# this is no build dependency, but needed for luaevent` \
|
libevent-dev `# this is no build dependency, but needed for luaevent` \
|
||||||
libidn11 \
|
libidn11 \
|
||||||
|
libjs-bootstrap4 \
|
||||||
|
libjs-jquery \
|
||||||
libpq-dev \
|
libpq-dev \
|
||||||
libsqlite3-0 \
|
libsqlite3-0 \
|
||||||
lua5.2 \
|
lua5.2 \
|
||||||
|
@ -102,9 +108,16 @@ RUN download-prosody-modules.bash \
|
||||||
csi `# client state indication (XEP-0352)` \
|
csi `# client state indication (XEP-0352)` \
|
||||||
e2e_policy `# require end-2-end encryption` \
|
e2e_policy `# require end-2-end encryption` \
|
||||||
filter_chatstates `# disable "X is typing" type messages` \
|
filter_chatstates `# disable "X is typing" type messages` \
|
||||||
|
http_libjs `# invite-based account registration web dependency` \
|
||||||
|
http_upload `# file sharing (XEP-0363)` \
|
||||||
|
invites `# invite-based account registration` \
|
||||||
|
invites_adhoc \
|
||||||
|
invites_page \
|
||||||
|
invites_register \
|
||||||
|
invites_register_web \
|
||||||
|
register_apps \
|
||||||
smacks `# stream management (XEP-0198)` \
|
smacks `# stream management (XEP-0198)` \
|
||||||
throttle_presence `# presence throttling in CSI` \
|
throttle_presence `# presence throttling in CSI` \
|
||||||
http_upload `# file sharing (XEP-0363)` \
|
|
||||||
vcard_muc `# XEP-0153: vCard-Based Avatar (MUC)` \
|
vcard_muc `# XEP-0153: vCard-Based Avatar (MUC)` \
|
||||||
&& rm -rf "/usr/src/prosody-modules"
|
&& rm -rf "/usr/src/prosody-modules"
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,15 @@ https_ssl = {
|
||||||
key = "certs/" .. domain_http_upload .. "/privkey.pem";
|
key = "certs/" .. domain_http_upload .. "/privkey.pem";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
-- Configure the number of seconds a token is valid for (default 7 days)
|
||||||
|
-- TODO make configurable
|
||||||
|
invite_expiry = 86400 * 7
|
||||||
|
|
||||||
VirtualHost (domain)
|
VirtualHost (domain)
|
||||||
|
http_paths = {
|
||||||
|
invites_page = "/invite";
|
||||||
|
invites_register_web = "/register";
|
||||||
|
}
|
||||||
|
|
||||||
-- Set up a http file upload because proxy65 is not working in muc
|
-- Set up a http file upload because proxy65 is not working in muc
|
||||||
Component (domain_http_upload) "http_upload"
|
Component (domain_http_upload) "http_upload"
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
export ALLOW_REGISTRATION=${ALLOW_REGISTRATION:-true}
|
export ALLOW_REGISTRATION=${ALLOW_REGISTRATION:-true}
|
||||||
|
export REGISTRATION_INVITE_ONLY=${REGISTRATION_INVITE_ONLY:-false}
|
||||||
export DOMAIN_HTTP_UPLOAD=${DOMAIN_HTTP_UPLOAD:-"upload.$DOMAIN"}
|
export DOMAIN_HTTP_UPLOAD=${DOMAIN_HTTP_UPLOAD:-"upload.$DOMAIN"}
|
||||||
export DOMAIN_MUC=${DOMAIN_MUC:-"conference.$DOMAIN"}
|
export DOMAIN_MUC=${DOMAIN_MUC:-"conference.$DOMAIN"}
|
||||||
export DOMAIN_PROXY=${DOMAIN_PROXY:-"proxy.$DOMAIN"}
|
export DOMAIN_PROXY=${DOMAIN_PROXY:-"proxy.$DOMAIN"}
|
||||||
|
|
|
@ -10,6 +10,7 @@ pidfile = "/var/run/prosody/prosody.pid"
|
||||||
use_libevent = true; -- improves performance
|
use_libevent = true; -- improves performance
|
||||||
|
|
||||||
allow_registration = os.getenv("ALLOW_REGISTRATION");
|
allow_registration = os.getenv("ALLOW_REGISTRATION");
|
||||||
|
registration_invite_only = os.getenv("REGISTRATION_INVITE_ONLY");
|
||||||
|
|
||||||
c2s_require_encryption = os.getenv("C2S_REQUIRE_ENCRYPTION");
|
c2s_require_encryption = os.getenv("C2S_REQUIRE_ENCRYPTION");
|
||||||
s2s_require_encryption = os.getenv("S2S_REQUIRE_ENCRYPTION");
|
s2s_require_encryption = os.getenv("S2S_REQUIRE_ENCRYPTION");
|
||||||
|
|
|
@ -189,6 +189,7 @@ Inspect logs: ```docker-compose logs -f```.
|
||||||
| Variable | Description | Type | Default value |
|
| Variable | Description | Type | Default value |
|
||||||
| -------------------------------- | -------------------------------------------------------------------------------------------------------------------- | ------------ | -------------------------- |
|
| -------------------------------- | -------------------------------------------------------------------------------------------------------------------- | ------------ | -------------------------- |
|
||||||
| **ALLOW_REGISTRATION** | Whether to allow registration of new accounts via Jabber clients | *optional* | true |
|
| **ALLOW_REGISTRATION** | Whether to allow registration of new accounts via Jabber clients | *optional* | true |
|
||||||
|
| **REGISTRATION_INVITE_ONLY** | Require an invitation token for all account registration | *optional* | false |
|
||||||
| **DOMAIN** | domain | **required** | null |
|
| **DOMAIN** | domain | **required** | null |
|
||||||
| **DOMAIN_HTTP_UPLOAD** | Domain which lets clients upload files over HTTP | *optional* | upload.**DOMAIN** |
|
| **DOMAIN_HTTP_UPLOAD** | Domain which lets clients upload files over HTTP | *optional* | upload.**DOMAIN** |
|
||||||
| **DOMAIN_MUC** | Domain for Multi-user chat (MUC) for allowing you to create hosted chatrooms/conferences for XMPP users | *optional* | conference.**DOMAIN** |
|
| **DOMAIN_MUC** | Domain for Multi-user chat (MUC) for allowing you to create hosted chatrooms/conferences for XMPP users | *optional* | conference.**DOMAIN** |
|
||||||
|
|
|
@ -93,3 +93,21 @@ load 'bats/bats-assert/load'
|
||||||
assert_success
|
assert_success
|
||||||
assert_output
|
assert_output
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@test "Should serve register_apps" {
|
||||||
|
run bash -c "sudo docker-compose logs | grep \"Serving 'register_apps' at https:\/\/localhost:5281\/register_apps\""
|
||||||
|
assert_success
|
||||||
|
assert_output
|
||||||
|
}
|
||||||
|
|
||||||
|
@test "Should serve invites_page" {
|
||||||
|
run bash -c "sudo docker-compose logs | grep \"Serving 'invites_page' at https:\/\/localhost:5281\/invite\""
|
||||||
|
assert_success
|
||||||
|
assert_output
|
||||||
|
}
|
||||||
|
|
||||||
|
@test "Should serve invites_register_web" {
|
||||||
|
run bash -c "sudo docker-compose logs | grep \"Serving 'invites_register_web' at https:\/\/localhost:5281\/register\""
|
||||||
|
assert_success
|
||||||
|
assert_output
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue