diff options
| author | yalh76 <yalh@yahoo.com> | 2020-06-03 20:46:14 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-06-03 20:46:14 +0200 |
| commit | df0587009fbad43a6e083da2883707f421d7a36e (patch) | |
| tree | b93e9ffb74da537fc74a0a35541cfab943dd8d3d /conf | |
| parent | ee08de04d42a5e9831f500242bd99d4cb63fbd19 (diff) | |
| parent | 8fea96dcd81f40923ba2f599c3b7ab838429f2de (diff) | |
| download | mastodon_ynh-df0587009fbad43a6e083da2883707f421d7a36e.tar.gz mastodon_ynh-df0587009fbad43a6e083da2883707f421d7a36e.tar.bz2 mastodon_ynh-df0587009fbad43a6e083da2883707f421d7a36e.zip | |
Merge pull request #224 from YunoHost-Apps/cleaning
Cleaning
Diffstat (limited to 'conf')
| -rw-r--r-- | conf/cron | 7 | ||||
| -rw-r--r-- | conf/mastodon-sidekiq.service | 2 | ||||
| -rw-r--r-- | conf/mastodon-web.service | 2 | ||||
| -rw-r--r-- | conf/nginx.conf | 12 |
4 files changed, 13 insertions, 10 deletions
@@ -1,2 +1,5 @@ -RAILS_ENV=production -@daily cd __FINAL__PATH__/live && /opt/rbenv/versions/2.6.5/bin/bundle exec rake __USER__:media:remove_remote +@daily cd __FINAL_PATH__/live && RAILS_ENV=production bin/tootctl media remove +@monthly cd __FINAL_PATH__/live && RAILS_ENV=production bin/tootctl media remove-orphans +@monthly cd __FINAL_PATH__/live && RAILS_ENV=production bin/tootctl accounts cull +@monthly cd __FINAL_PATH__/live && RAILS_ENV=production bin/tootctl statuses remove +@monthly cd __FINAL_PATH__/live && RAILS_ENV=production bin/tootctl preview_cards remove diff --git a/conf/mastodon-sidekiq.service b/conf/mastodon-sidekiq.service index d5fc7e1..73f29e5 100644 --- a/conf/mastodon-sidekiq.service +++ b/conf/mastodon-sidekiq.service @@ -9,7 +9,7 @@ Environment="RAILS_ENV=production" Environment="DB_POOL=25" Environment="MALLOC_ARENA_MAX=2" - ExecStart=/opt/rbenv/versions/2.6.5/bin/bundle exec sidekiq -c 25 + ExecStart=__RBENVROOT__/shims/bundle exec sidekiq -c 25 TimeoutSec=15 Restart=always StandardError=syslog diff --git a/conf/mastodon-web.service b/conf/mastodon-web.service index bb65afe..14d1260 100644 --- a/conf/mastodon-web.service +++ b/conf/mastodon-web.service @@ -8,7 +8,7 @@ WorkingDirectory=__FINALPATH__/live Environment="RAILS_ENV=production" Environment="PORT=__PORT_WEB__" - ExecStart=/opt/rbenv/versions/2.6.5/bin/bundle exec puma -C config/puma.rb + ExecStart=__RBENVROOT__/shims/bundle exec puma -C config/puma.rb ExecReload=/bin/kill -SIGUSR1 $MAINPID TimeoutSec=15 Restart=always diff --git a/conf/nginx.conf b/conf/nginx.conf index d348613..866fcc7 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -19,14 +19,14 @@ location / { } location ~ ^/(emoji|packs|system/accounts/avatars|system/media_attachments/files) { - add_header Cache-Control "public, max-age=31536000, immutable"; - add_header Strict-Transport-Security "max-age=31536000"; + more_set_headers "Cache-Control: public, max-age=31536000, immutable"; + more_set_headers "Strict-Transport-Security: max-age=31536000"; try_files $uri @proxy; } location /sw.js { - add_header Cache-Control "public, max-age=0"; - add_header Strict-Transport-Security "max-age=31536000"; + more_set_headers "Cache-Control: public, max-age=0"; + more_set_headers "Strict-Transport-Security: max-age=31536000"; try_files $uri @proxy; } @@ -49,8 +49,8 @@ location @proxy { proxy_cache_valid 200 7d; proxy_cache_valid 410 24h; proxy_cache_use_stale error timeout updating http_500 http_502 http_503 http_504; - add_header X-Cached $upstream_cache_status; - add_header Strict-Transport-Security "max-age=31536000"; + more_set_headers "X-Cached: $upstream_cache_status"; + more_set_headers "Strict-Transport-Security: max-age=31536000"; tcp_nodelay on; } |
