1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/discourse_ynh.git synced 2024-09-03 18:26:18 +02:00

Rename magick_prefix tools_prefix

This commit is contained in:
Félix Piédallu 2024-08-30 13:41:05 +02:00
parent c8c6ece943
commit 411a6be993
2 changed files with 8 additions and 7 deletions

View file

@ -14,7 +14,7 @@ Environment=RAILS_ENV=production
Environment=UNICORN_SIDEKIQS=1
Environment=LD_PRELOAD=__LIBJEMALLOC__
Environment=UNICORN_LISTENER=__INSTALL_DIR__/discourse/tmp/sockets/unicorn.sock
Environment="__YNH_RUBY_LOAD_PATH__:__MAGICK_PREFIX__/bin"
Environment="__YNH_RUBY_LOAD_PATH__:__TOOLS_PREFIX__/bin"
ExecStart=__INSTALL_DIR__/discourse/bin/bundle exec unicorn --config config/unicorn.conf.rb -E production
Restart=always
RestartSec=10

View file

@ -59,17 +59,18 @@ check_memory_requirements_upgrade() {
fi
}
magick_prefix="$install_dir/imagemagick"
# See https://github.com/discourse/discourse_docker/blob/main/image/base/install-imagemagick
tools_prefix="$install_dir/dependencies"
install_imagemagick() {
# See https://github.com/discourse/discourse_docker/blob/main/image/base/install-imagemagick
ynh_setup_source --source_id="imagemagickv7" --dest_dir="$install_dir/imagemagick_source"
mkdir -p "$magick_prefix"
chown -R "$app:$app" "$install_dir/imagemagick_source" "$magick_prefix"
mkdir -p "$tools_prefix"
chown -R "$app:$app" "$install_dir/imagemagick_source" "$tools_prefix"
pushd "$install_dir/imagemagick_source"
ynh_exec_as "$app" CFLAGS="-O2 -I$magick_prefix/include -Wno-deprecated-declarations" \
ynh_exec_as "$app" CFLAGS="-O2 -I$tools_prefix/include -Wno-deprecated-declarations" \
./configure \
--prefix="$magick_prefix" \
--prefix="$tools_prefix" \
--enable-static \
--enable-bounds-checking \
--enable-hdri \