Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
4b3d9c6
Upstream update and switch from redis-server to redid-stack-server
grossermensch Dec 15, 2025
702a6e0
Update helper with Redis Bloom install helper
grossermensch Dec 15, 2025
d49dd42
Remove stack server, and continue with manual bloom filter install
grossermensch Dec 15, 2025
cd1c146
Add Redis Bloom module install
grossermensch Dec 15, 2025
50f1dbc
Extend upgrade script to ensure Redis Bloom is installed
grossermensch Dec 15, 2025
9588a1c
Update remove to include Redis Bloom removal
grossermensch Dec 15, 2025
e1cac61
Update Bloom helper to fixed version
grossermensch Dec 15, 2025
6200fe0
Update install for Redis Bloom
grossermensch Dec 15, 2025
d0c1334
Update upgrade for Redis Bloom script
grossermensch Dec 15, 2025
39f5391
Update remove of Redis Bloom
grossermensch Dec 15, 2025
1b4de9f
Fix Redis Bloom to v2.8.17
grossermensch Dec 15, 2025
c2f1d55
Fix syntax error for download
grossermensch Dec 15, 2025
ac1f472
Fix download syntax error
grossermensch Dec 15, 2025
ec86846
Fetch newest Redis Bloom Version
grossermensch Dec 15, 2025
eba3385
Updated Bloom module install
grossermensch Dec 15, 2025
8ebfd8c
Update upgrade script for Redis Bloom module
grossermensch Dec 15, 2025
56d9241
Update removal to include Bloom module
grossermensch Dec 15, 2025
304808a
Update to include Redis Bloom module
grossermensch Dec 15, 2025
110afa2
Updated to follow v2 package standards
grossermensch Dec 15, 2025
f60dc90
Updated to follow v2 packaging standards
grossermensch Dec 15, 2025
635da87
Update remove to follow v2 package standards
grossermensch Dec 15, 2025
1f61f17
Update sources
grossermensch Dec 15, 2025
6082304
Update for multi-source
grossermensch Dec 15, 2025
961913d
Small naming fix
grossermensch Dec 15, 2025
5867cb0
change —source to —source_id
grossermensch Dec 15, 2025
4ebdd8e
Source update
grossermensch Dec 15, 2025
08f16ed
Update to new loops version
grossermensch Dec 15, 2025
b5c6b09
Merge branch 'testing' into grossermensch-patch-1
grossermensch Dec 15, 2025
4803ea1
Update install script for Bloom install
grossermensch Dec 15, 2025
e241980
Change upgrade script for working order of commands
grossermensch Dec 15, 2025
e93dc21
Use temp folder for Bloom install
grossermensch Dec 15, 2025
d480c7a
Move Bloom install to temp folder
grossermensch Dec 15, 2025
9df40f1
Updated using pushd/popd
grossermensch Dec 15, 2025
6d99fbe
Update upgrade using pushd/popd for Redis Bloom
grossermensch Dec 15, 2025
9041bba
Change make to use sudo instead of user
grossermensch Dec 15, 2025
878cced
Change make to use sudo instead of app
grossermensch Dec 15, 2025
91e5b96
Files in subdir
grossermensch Dec 16, 2025
bea4f0a
Debugging of extraction of Bloom module
grossermensch Dec 16, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,16 @@ ram.runtime = "350M"
[resources]

[resources.sources]

[resources.sources.main]
url = "https://github.com/joinloops/loops-server/archive/7d875cd74121b061b6efa5b54a1f5c06adbee821.zip"
sha256 = "4c78f68e57d7e4f2950f0dd5f59ef384876355d6635c59362e3ca0f1099a8828"

[resources.sources.redisbloom]
url = "https://github.com/RedisBloom/RedisBloom/archive/refs/tags/v2.8.17.tar.gz"
sha256 = "b3bda37ae84d86d8dfcf8fd006595574924e2458cb61541d5068358f0ccb3763"
in_subdir = true

[resources.system_user]
allow_email = true

Expand All @@ -105,7 +110,7 @@ ram.runtime = "350M"
main.url = "/"

[resources.apt]
packages = "mariadb-server, libgd3, jpegoptim, optipng, pngquant, ffmpeg, imagemagick, php8.4-redis, php8.4-bcmath, php8.4-cli, php8.4-ctype, php8.4-exif, php8.4-gd, php8.4-iconv, php8.4-intl, php8.4-mbstring, php8.4-tokenizer, php8.4-xml, php8.4-pdo, php8.4-mysql, php8.4-zip, php8.4-fileinfo, php8.4-imagick, redis-server"
packages = "mariadb-server, libgd3, jpegoptim, optipng, pngquant, ffmpeg, imagemagick, php8.4-redis, php8.4-bcmath, php8.4-cli, php8.4-ctype, php8.4-exif, php8.4-gd, php8.4-iconv, php8.4-intl, php8.4-mbstring, php8.4-tokenizer, php8.4-xml, php8.4-pdo, php8.4-mysql, php8.4-zip, php8.4-fileinfo, php8.4-imagick, redis-server, build-essential, make, curl"

[resources.database]
type = "mysql"
Expand Down
8 changes: 8 additions & 0 deletions scripts/_common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,11 @@
#=================================================

timezone=$(timedatectl show --value --property=Timezone)

# REDIS BLOOM INSTALL HELPER
# Fetch latest RedisBloom release tag from GitHub
get_latest_redisbloom_version() {
curl -s https://api.github.com/repos/RedisBloom/RedisBloom/releases/latest \
| grep '"tag_name"' \
| cut -d '"' -f 4
}
38 changes: 38 additions & 0 deletions scripts/install
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,44 @@ popd

chown -R $app:www-data $install_dir

#=================================================
# INSTALL REDIS BLOOM MODULE
#=================================================

ynh_print_info "Installing RedisBloom (latest version)"

# Download and extract source using Yunohost helper
tmpdir="$(mktemp -d)"
ynh_setup_source --source_id="redisbloom" --dest_dir="$tmpdir"

# Build module
pushd "$tmpdir"
ls -a
make
popd

# Install module
mkdir -p /etc/redis/modules
install -m 644 "$tmpdir/bin/redisbloom.so" /etc/redis/modules/redisbloom.so

# Create module config
cat > /etc/redis/modules/redisbloom.conf <<EOF
loadmodule /etc/redis/modules/redisbloom.so
EOF

# Ensure redis.conf includes module
if ! grep -q "redisbloom.conf" /etc/redis/redis.conf; then
echo "include /etc/redis/modules/redisbloom.conf" >> /etc/redis/redis.conf
fi

# Clean up build directory
ynh_secure_remove --file="$tmpdir"

# Restart Redis
ynh_systemctl --service="redis-server" --action="restart"

ynh_print_info "RedisBloom installed successfully"

#=================================================
# APP INITIAL CONFIGURATION
#=================================================
Expand Down
17 changes: 17 additions & 0 deletions scripts/remove
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,23 @@ ynh_config_remove_phpfpm

ynh_safe_rm "/etc/cron.d/$app"

#==================================================
# Remove Redis Bloom config
#==================================================
ynh_print_info "Removing RedisBloom module"

# Remove include from redis.conf
sed -i '/redisbloom.conf/d' /etc/redis/redis.conf || true

# Remove module files
ynh_secure_remove --file="/etc/redis/modules/redisbloom.so"
ynh_secure_remove --file="/etc/redis/modules/redisbloom.conf"

# Restart Redis
ynh_systemctl --service="redis-server" --action="restart"

ynh_print_info "RedisBloom removed successfully"

#=================================================
# END OF SCRIPT
#=================================================
Expand Down
43 changes: 43 additions & 0 deletions scripts/upgrade
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,49 @@ popd

chown -R $app:www-data $install_dir

#=================================================
# FORCE UPDATE REDIS BLOOM MODULE AND INSTALL IF NOT THERE
#=================================================

ynh_print_info "Upgrading RedisBloom module"

MODULE_PATH="/etc/redis/modules/redisbloom.so"
MODULE_CONF="/etc/redis/modules/redisbloom.conf"

# Ensure module directory exists
mkdir -p /etc/redis/modules

# Download and extract source

tmpdir="$(mktemp -d)"
ynh_setup_source --source_id="redisbloom" --dest_dir="$tmpdir"

# Build module
pushd "$tmpdir"
make
popd

# Install module
install -m 644 $tmpdir/bin/redisbloom.so "$MODULE_PATH"

# Ensure config exists
if [ ! -f "$MODULE_CONF" ]; then
echo "loadmodule $MODULE_PATH" > "$MODULE_CONF"
fi

# Ensure redis.conf includes module
if ! grep -q "redisbloom.conf" /etc/redis/redis.conf; then
echo "include /etc/redis/modules/redisbloom.conf" >> /etc/redis/redis.conf
fi

# Clean up build directory
ynh_secure_remove --file="$tmpdir"

# Restart Redis
ynh_systemctl --service="redis-server" --action="restart"

ynh_print_info "RedisBloom upgraded successfully"

#=================================================
# APP CONFIGURATION
#=================================================
Expand Down