update with .env file and new config entries

This commit is contained in:
John Crisp
2025-10-30 16:14:30 +01:00
parent 5cc01e31f9
commit 18d1bd81e0
5 changed files with 124 additions and 35 deletions

View File

@@ -8,6 +8,7 @@ use esmith::Build::CreateLinks qw(:all);
foreach (qw(
/home/e-smith/files/docker/configs/docker-compose.yml
/home/e-smith/files/docker/configs/.env
))
{
@@ -17,6 +18,7 @@ foreach (qw(
bootstrap-console-save
remoteaccess-update
smeserver-rocketchat-update
smeserver-docker-compose-update
));
}

View File

@@ -0,0 +1,61 @@
#!/bin/sh
# Change these
#REG_TOKEN=
#DOMAIN=""
# Koozali mods
{
my $root_url = ${rocketchat}{rootURL};
$OUT .= "ROOT_URL=https://$root_url\n";
my $version = ${rocketchat}{Version} || "1.0.0";
$OUT .= "RELEASE=$version\n";
my $mailUrl = ${rocketchat}{mailURL} || "localhost";
my $mailPort = ":" . ${rocketchat}{mailPort} || ":25";
my $mailServer = "smtp://" . $mailUrl . $mailPort;
my $memLimit = ${rocketchat}{memLimit} || "2048";
$memLimit = $memLimit . "MB";
$OUT .= "MAIL_URL=$mailServer\n";
$OUT .= "TCP_PORT=4000\n";
$OUT .= "MEM_LIMIT=$memLimit\n";
}
# Running a local mongo
MONGO_URL=mongodb://127.0.0.1:27017/rocketchat?replicaSet=rs0
# End Koozali Mods
# Change to true after you set your domain and valid lets encrypt email
LETSENCRYPT_ENABLED=false
LETSENCRYPT_EMAIL=demo@email.com
TRAEFIK_PROTOCOL=http
# Prometheus
PROMETHEUS_RETENTION_SIZE=15GB
PROMETHEUS_RETENTION_TIME=15d
# default prometheus port (9090) conflicts with cockpit in centos
PROMETHEUS_PORT=9000
# Grafana
# Set to empty string to use a subpath
GRAFANA_DOMAIN=
# set to /grafana to use from a subpath
GRAFANA_PATH=/grafana
GRAFANA_ADMIN_PASSWORD=rc-admin
GRAFANA_HOST_PORT=5050
# Traefik ports
TRAEFIK_HTTP_PORT=80
TRAEFIK_DASHBOARD_PORT=8080
TRAEFIK_HTTPS_PORT=443
# Port for Grafana to be accessed externally
GRAFANA_HOST_PORT=5050
# MongoDB
MONGODB_BIND_IP=127.0.0.1
MONGODB_PORT_NUMBER=27017

View File

@@ -0,0 +1,54 @@
rocketchat:
image: "$\{IMAGE:-registry.rocket.chat/rocketchat/rocket.chat\}:$\{RELEASE:-latest\}"
restart: always
container_name: rocketchat
#labels:
# traefik.enable: "false"
# prometheus.io/scrape: "true"
# prometheus.io/port: $\{METRICS_PORT:-9458\}
environment:
ROOT_URL: $\{ROOT_URL:-http://localhost\}
PORT: $\{PORT:-3000\}
DEPLOY_METHOD: docker
DEPLOY_PLATFORM: compose
# REG_TOKEN: $\{REG_TOKEN:-\}
LICENSE_DEBUG: true
#OVERWRITE_SETTING_Prometheus_Enabled: true
#OVERWRITE_SETTING_Prometheus_Port: $\{METRICS_PORT:-9458\}
MONGO_URL: $\{MONGO_URL:-mongodb://mongodb:27017/rocketchat?replicaSet=rs0\}
#TRANSPORTER: $\{NATS_URL-monolith+nats://nats:4222\}
#INSTANCE_IP: $\{INSTANCE_IP:-\}
TCP_PORT: $\{TCP_PORT:-4000\}
# Koozali Extras
MAIL_URL: $\{MAIL_URL\}
HTTP_FORWARDED_COUNT: 1
Accounts_UseDNSDomainCheck: True
OVERWRITE_SETTING_Accounts_TwoFactorAuthentication_Enforce_Password_Fallback: false
OVERWRITE_SETTING_Accounts_TwoFactorAuthentication_Enabled: false
BYPASS_MONGO_VALIDATION: true
# Specify an absolute path mapping
volumes:
- /opt/uploads/:/opt/uploads/
network_mode: "host"
# End Koozali Extras
mem_limit: $\{MEM_LIMIT:-2048MB\}";
#expose:
#- ${PORT:-3000}
#- ${METRICS_PORT:-9458}
#ports:
#- "${BIND_IP:-0.0.0.0}:${HOST_PORT:-3000}:${PORT:-3000}"
#- "${BIND_IP:-0.0.0.0}:${METRICS_PORT:-9458}:${METRICS_PORT:-9458}"
# healthcheck:
# test: ["CMD", "nc", "-zv", "-w", "10", "rocketchat", "${PORT:-3000}"]
# interval: 30s
# timeout: 10s
# retries: 10
# start_period: 30s

View File

@@ -1,32 +0,0 @@
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

View File

@@ -1,6 +1,6 @@
%define name smeserver-rocketchat
%define version 0.4
%define release 3
%define release 4
Summary: Plugin to enable RocketChat
Name: %{name}
Version: %{version}
@@ -12,8 +12,8 @@ Source: %{name}-%{version}.tar.xz
BuildRoot: /var/tmp/%{name}-%{version}
BuildArchitectures: noarch
BuildRequires: smeserver-devtools
Requires: smeserver-release >= 10.0
Requires: mongodb-org-server >= 4.2
Requires: smeserver-release >= 11.0
Requires: mongodb-org-server >= 7.0
Requires: smeserver-docker
AutoReqProv: no
@@ -22,6 +22,10 @@ AutoReqProv: no
The ultimate Free Open Source Solution for team communications.
%changelog
* THu Oct 30 2025 John Crisp <jcrisp@safeandsoundit.co.uk> 0.4-4.sme
- Update for docker-compose with .env [SME: 13259]
- Add TCP_PORT and memLimit keys
* Sun Sep 08 2024 fix-e-smith-pkg.sh by Trevor Batley <trevor@batley.id.au> 0.4-3.sme
- Fix e-smith references in smeserver-rocketchat [SME: 12732]