mirror of
https://github.com/YunoHost-Apps/glitchsoc_ynh.git
synced 2024-09-03 19:15:59 +02:00
wip
This commit is contained in:
parent
34fc15bf3a
commit
846bec87e0
8 changed files with 24 additions and 6 deletions
|
@ -13,7 +13,8 @@ Environment="MALLOC_ARENA_MAX=2"
|
|||
ExecStart=__RBENV_ROOT__/versions/__APP__/bin/bundle exec sidekiq -c 25
|
||||
TimeoutSec=15
|
||||
Restart=always
|
||||
StandardError=syslog
|
||||
StandardOutput=append:/var/log/__APP__/__APP__-sidekiq.log
|
||||
StandardError=inherit
|
||||
|
||||
# Sandboxing options to harden security
|
||||
# Depending on specificities of your service/app, you may need to tweak these
|
||||
|
|
|
@ -13,7 +13,8 @@ Environment="__YNH_NODE_LOAD_PATH__"
|
|||
ExecStart=__YNH_NODE__ ./streaming
|
||||
TimeoutSec=15
|
||||
Restart=always
|
||||
StandardError=syslog
|
||||
StandardOutput=append:/var/log/__APP__/__APP__-strealing.log
|
||||
StandardError=inherit
|
||||
|
||||
# Sandboxing options to harden security
|
||||
# Depending on specificities of your service/app, you may need to tweak these
|
||||
|
|
|
@ -13,7 +13,8 @@ ExecStart=__RBENV_ROOT__/versions/__APP__/bin/bundle exec puma -C config/puma.rb
|
|||
ExecReload=/bin/kill -SIGUSR1 $MAINPID
|
||||
TimeoutSec=15
|
||||
Restart=always
|
||||
StandardError=syslog
|
||||
StandardOutput=append:/var/log/__APP__/__APP__-web.log
|
||||
StandardError=inherit
|
||||
|
||||
# Sandboxing options to harden security
|
||||
# Depending on specificities of your service/app, you may need to tweak these
|
||||
|
|
|
@ -8,6 +8,8 @@ MEMORY_NEEDED="2560"
|
|||
RUBY_VERSION="3.2.2"
|
||||
NODEJS_VERSION="16"
|
||||
|
||||
admin_mail=$(ynh_user_get_info --username=$admin --key='mail')
|
||||
|
||||
# Workaround for Mastodon on Bullseye
|
||||
# See https://github.com/mastodon/mastodon/issues/15751#issuecomment-873594463
|
||||
if [ "$(lsb_release --codename --short)" = "bullseye" ];
|
||||
|
|
|
@ -121,6 +121,10 @@ yunohost service add "$app-streaming" --description="$app streaming service"
|
|||
|
||||
ynh_add_config --template="../conf/cron" --destination="/etc/cron.d/$app"
|
||||
|
||||
ynh_use_logrotate --logfile=/var/log/__APP__/__APP__-sidekiq.log
|
||||
ynh_use_logrotate --logfile=/var/log/__APP__/__APP__-streaming.log
|
||||
ynh_use_logrotate --logfile=/var/log/__APP__/__APP__-web.log
|
||||
|
||||
#=================================================
|
||||
# APP INITIAL CONFIGURATION
|
||||
#=================================================
|
||||
|
|
|
@ -50,6 +50,8 @@ ynh_remove_nodejs
|
|||
# Remove other various files specific to the app... such as :
|
||||
ynh_secure_remove --file="/etc/cron.d/$app"
|
||||
|
||||
ynh_remove_logrotate
|
||||
|
||||
# Remove swap
|
||||
ynh_del_swap
|
||||
|
||||
|
|
|
@ -78,6 +78,10 @@ yunohost service add "$app-streaming" --description="$app streaming service"
|
|||
|
||||
# Other various files...
|
||||
|
||||
ynh_use_logrotate --logfile=/var/log/__APP__/__APP__-sidekiq.log
|
||||
ynh_use_logrotate --logfile=/var/log/__APP__/__APP__-streaming.log
|
||||
ynh_use_logrotate --logfile=/var/log/__APP__/__APP__-web.log
|
||||
|
||||
ynh_restore_file --origin_path="/etc/cron.d/$app"
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
source _common.sh
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
admin_mail=$(ynh_user_get_info --username=$admin --key='mail')
|
||||
config="$install_dir/live/.env.production"
|
||||
upgrade_type=$(ynh_check_app_version_changed)
|
||||
|
||||
|
@ -138,6 +137,12 @@ yunohost service add "$app-streaming" --description="$app streaming service"
|
|||
|
||||
ynh_add_systemd_config
|
||||
|
||||
ynh_add_config --template="../conf/cron" --destination="/etc/cron.d/$app"
|
||||
|
||||
ynh_use_logrotate --logfile=/var/log/__APP__/__APP__-sidekiq.log
|
||||
ynh_use_logrotate --logfile=/var/log/__APP__/__APP__-streaming.log
|
||||
ynh_use_logrotate --logfile=/var/log/__APP__/__APP__-web.log
|
||||
|
||||
#=================================================
|
||||
# RECONFIGURE THE APP (UPDATE CONF, APPLY MIGRATIONS...)
|
||||
#=================================================
|
||||
|
@ -151,8 +156,6 @@ ynh_add_config --template="../conf/.env.production.sample" --destination="$confi
|
|||
chmod 400 "$config"
|
||||
chown $app:$app "$config"
|
||||
|
||||
ynh_add_config --template="../conf/cron" --destination="/etc/cron.d/$app"
|
||||
|
||||
#=================================================
|
||||
# START SYSTEMD SERVICE
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue