1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/mastodon_ynh.git synced 2024-09-03 19:46:02 +02:00

[enh] Final_path on nginx

This commit is contained in:
nemsia 2017-05-25 14:52:17 +02:00
parent 7a6eb781f1
commit 9085da20f0
3 changed files with 7 additions and 2 deletions

View file

@ -2,7 +2,7 @@
client_max_body_size 100M;
# add to v1.4 assets
root /opt/mastodon/live/public;
root __FINALPATH__/live/public;
location / {

View file

@ -23,6 +23,9 @@ domain=$(ynh_app_setting_get "$app" domain)
final_path="/opt/${app}"
ynh_backup "$final_path" "sources" 1
# final_path on nginx
sudo sed -i "s@$final_path@__FINALPATH__@g" ../conf/nginx.conf
# Copy the nginx conf files
ynh_backup "/etc/nginx/conf.d/${domain}.d/${app}.conf" "nginx.conf"
ynh_backup "/etc/cron.d/${app}" "cron.conf"

View file

@ -208,7 +208,9 @@ RAILS_ENV=production bin/bundle exec rails mastodon:make_admin USERNAME=$admin_m
RAILS_ENV=production bin/bundle exec rails mastodon:confirm_email USER_EMAIL=$admin_mastodon_mail
ACOMMANDS
# Copy nginx config
# Modify Nginx configuration file and copy it to Nginx conf directory
sudo sed -i "s@__PATH__@$app@g" ../conf/nginx.conf*
sudo sed -i "s@__FINALPATH__@$final_path/@g" ../conf/nginx.conf*
sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/$app.conf
# Install crontab