initial commit of file from CVS for smeserver-rocketchat on Sat Sep 7 21:01:48 AEST 2024
This commit is contained in:
@@ -0,0 +1 @@
|
||||
3000
|
@@ -0,0 +1 @@
|
||||
5.4.9
|
@@ -0,0 +1 @@
|
||||
private
|
@@ -0,0 +1 @@
|
||||
25
|
@@ -0,0 +1 @@
|
||||
localhost
|
@@ -0,0 +1 @@
|
||||
chat.your.domain
|
@@ -0,0 +1 @@
|
||||
enabled
|
@@ -0,0 +1 @@
|
||||
service
|
@@ -0,0 +1,9 @@
|
||||
{
|
||||
|
||||
# Load wstunnel if available
|
||||
if ( -e '/usr/lib64/httpd/modules/mod_proxy_wstunnel.so' ||
|
||||
-e '/usr/lib/httpd/modules/mod_proxy_wstunnel.so'){
|
||||
$OUT .= "LoadModule proxy_wstunnel_module modules/mod_proxy_wstunnel.so\n";
|
||||
}
|
||||
}
|
||||
|
@@ -0,0 +1,9 @@
|
||||
{
|
||||
use esmith::DomainsDB;
|
||||
# Convert the passed hash for the domain object back into an object.
|
||||
$domain = bless \%domain, 'esmith::DB::db::Record';
|
||||
|
||||
# Make scalars from some of the properties of the domain
|
||||
$virtualHost = $domain->key;
|
||||
$OUT = "";
|
||||
}
|
@@ -0,0 +1 @@
|
||||
ServerName {$virtualHost}
|
@@ -0,0 +1,13 @@
|
||||
ServerAlias {
|
||||
|
||||
use esmith::HostsDB;
|
||||
use esmith::DomainsDB;
|
||||
my $hdb = esmith::HostsDB->open_ro();
|
||||
my %domains = map { $_->key => 1 } esmith::DomainsDB->open_ro->domains;
|
||||
my @hosts = grep {
|
||||
my $h = $_;
|
||||
($h->prop('HostType') eq 'Self') && !$domains{$h->key}
|
||||
} $hdb->get_hosts_by_domain($virtualHost);
|
||||
$OUT = join " ", map { $_->key } @hosts;
|
||||
}
|
||||
|
@@ -0,0 +1,29 @@
|
||||
{
|
||||
my $ssl = $domain->prop('RequireSSL') || 'disabled';
|
||||
my $auth = $domain->prop('Authentication') || 'none';
|
||||
|
||||
if (($modSSL{TCPPort} || "443") eq $port){
|
||||
$OUT .= " SSLEngine on\n";
|
||||
}
|
||||
elsif (($ssl =~ m/^enabled|yes|on|1$/i) || ($auth =~ /^LemonLDAP/)){
|
||||
$OUT .=<<'EOF';
|
||||
RewriteEngine on
|
||||
RewriteCond %{REQUEST_URI} !^/.well-known/acme-challenge/.*
|
||||
RewriteRule ^/.well-known/acme-challenge(/.*|\$) https://%{HTTP_HOST}/.well-known/acme-challenge\$1 [L,R]
|
||||
RewriteRule ^/(.*|$) https://%{HTTP_HOST}/$1 [L,R]
|
||||
|
||||
EOF
|
||||
}
|
||||
elsif ($ssl =~ m#/#){
|
||||
$OUT .= " RewriteEngine on\n";
|
||||
foreach my $loc (split(/[;,]/, $ssl)){
|
||||
$OUT .= " # Rewriting $loc to use SSL\n";
|
||||
$loc =~ s#^/##;
|
||||
$OUT .= " RewriteRule ^/$loc(/.*|\$) https://%\{HTTP_HOST\}/$loc\$1 \[L,R\]\n";
|
||||
}
|
||||
}
|
||||
else{
|
||||
$OUT .= '';
|
||||
}
|
||||
}
|
||||
|
@@ -0,0 +1,8 @@
|
||||
{
|
||||
$OUT =<<'HERE';
|
||||
RewriteEngine on
|
||||
RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
|
||||
RewriteRule .* - [F]
|
||||
HERE
|
||||
}
|
||||
|
@@ -0,0 +1,2 @@
|
||||
# Alias for letsencrypt
|
||||
Alias /.well-known/acme-challenge/ /home/e-smith/files/ibays/Primary/html/.well-known/acme-challenge/
|
@@ -0,0 +1,13 @@
|
||||
{
|
||||
my $alias = $domain->prop('IconAlias') || 'enabled';
|
||||
$OUT .= '';
|
||||
|
||||
unless ($alias =~ m/disabled|off|no|0/i){
|
||||
$OUT .=<<'EOF';
|
||||
|
||||
# alias for Apache icons
|
||||
Alias /icons/ /var/www/icons/
|
||||
|
||||
EOF
|
||||
}
|
||||
}
|
@@ -0,0 +1,21 @@
|
||||
ProxyPreserveHost on
|
||||
SetEnv proxy-nokeepalive 1
|
||||
ProxyPass /.well-known/acme-challenge/ !
|
||||
|
||||
DocumentRoot /home/e-smith/files/ibays/Primary/html
|
||||
|
||||
<IfModule mod_proxy_wstunnel.c>
|
||||
ProxyPassMatch ^/sockjs/(.*)/websocket ws://localhost:3000/sockjs/$1/websocket
|
||||
ProxyPass /websocket ws://localhost:3000/websocket
|
||||
</IfModule>
|
||||
|
||||
ProxyPass / http://localhost:3000/
|
||||
ProxyPassReverse / http://localhost:3000/
|
||||
|
||||
<Location />
|
||||
Require all granted
|
||||
</Location>
|
||||
|
||||
<Location /.well-known/acme-challenge/>
|
||||
Require all granted
|
||||
</Location>
|
@@ -0,0 +1,2 @@
|
||||
|
||||
<VirtualHost {$ipAddress}:{$port}>
|
@@ -0,0 +1,2 @@
|
||||
</VirtualHost>
|
||||
|
@@ -0,0 +1,32 @@
|
||||
rocketchat:
|
||||
{
|
||||
my $version = ${rocketchat}{Version} || "1.0.0";
|
||||
#$OUT .= " image: registry.rocket.chat/rocketchat/rocket.chat:$version";
|
||||
$OUT .= " image: rocketchat/rocket.chat:$version";
|
||||
}
|
||||
container_name: rocketchat
|
||||
environment:
|
||||
# Use ?replSet=rs0 if you have replica sets (this is the templates-custom template)
|
||||
- MONGO_URL=mongodb://127.0.0.1:27017/rocketchat?replicaSet=rs0
|
||||
- MONGO_OPLOG_URL=mongodb://127.0.0.1:27017/local?replicaSet=rs0
|
||||
{
|
||||
$OUT .= " - ROOT_URL=https://$rocketchat{rootURL}\n";
|
||||
$OUT .= " - MAIL_URL=smtp://$rocketchat{mailURL}";
|
||||
}
|
||||
- HTTP_FORWARDED_COUNT=1
|
||||
- Accounts_UseDNSDomainCheck=True
|
||||
- OVERWRITE_SETTING_Accounts_TwoFactorAuthentication_Enforce_Password_Fallback=false
|
||||
- OVERWRITE_SETTING_Accounts_TwoFactorAuthentication_Enabled=false
|
||||
# ports:
|
||||
# - 3000:3000
|
||||
network_mode: host
|
||||
# Specify an absolute path mapping
|
||||
volumes:
|
||||
- /opt/uploads/:/opt/uploads/
|
||||
restart: on-failure:2
|
||||
# Might need the UID/GID rather than name
|
||||
# user: dockerroot:dockerroot
|
||||
# user: 392:390
|
||||
# Memory Limit
|
||||
mem_limit: 2048MB
|
||||
|
Reference in New Issue
Block a user