fix(sitemap): save generated sitemaps in configurable directory

Previously in priv/static, now by default in production in /var/lib/mobilizon/sitemap and
configurable through the $MOBILIZON_SITEMAP_PATH ENV variable

Closes #1321

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2023-09-05 20:04:26 +02:00
parent 13099e0f11
commit f28109ad50
4 changed files with 10 additions and 1 deletions

View File

@@ -392,6 +392,9 @@ config :mobilizon, Mobilizon.Service.GlobalSearch.SearchMobilizon,
config :mobilizon, Mobilizon.Service.AntiSpam, service: Mobilizon.Service.AntiSpam.Akismet
config :mobilizon, Mobilizon.Service.SiteMap,
path: System.get_env("MOBILIZON_SITEMAP_PATH", "/var/lib/mobilizon/sitemap")
# Import environment specific config. This must remain at the bottom
# of this file so it overrides the configuration defined above.
import_config "#{config_env()}.exs"