aboutsummaryrefslogtreecommitdiffstats
path: root/roles/mastodon/vars/main.yml
blob: cede4a0bc394683f62d0e1c5f21ac446021f2130 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
mastodon_packages:
  - nodejs
  - yarnpkg
  - gcc
  - g++
  - libicu-devel
  - zlib-devel
  - openssl-devel
  - libidn-devel
  - ruby-devel
  - libpq-devel
  - git
  - ruby
  - ImageMagick
  - ffmpeg

mastodon_keytab: /var/lib/gssproxy/clients/{{ mastodon_user }}.keytab
mastodon_home: /opt/mastodon
mastodon_user: mastodon
mastodon_install_dir: '{{ mastodon_home }}/mastodon'
mastodon_webroot: '{{ mastodon_install_dir }}/public'
mastodon_git_repo: https://github.com/mastodon/mastodon

mastodon_apache_config: |
  {% if mastodon_login_cidrs %}
  <Location /auth/sign_in>
  {% for cidr in mastodon_login_cidrs %}
    Require ip {{ cidr }}
  {% endfor %}
  </Location>
  {% endif %}

  <LocationMatch "^/(assets|avatars|emoji|headers|packs|sounds|system)">
    Header always set Cache-Control "public, max-age=31536000, immutable"
    Require all granted
  </LocationMatch>

  ProxyPass /500.html !
  ProxyPass /sw.js !
  ProxyPass /robots.txt !
  ProxyPass /manifest.json !
  ProxyPass /browserconfig.xml !
  ProxyPass /mask-icon.svg !
  ProxyPass /inert.css !
  ProxyPassMatch ^(/.*\.(png|ico)$) !
  ProxyPassMatch ^/(assets|avatars|emoji|headers|packs|sounds|system) !

  {{ apache_proxy_config }}
  ProxyPass        /api/v1/streaming  ws://127.0.0.1:{{ mastodon_streaming_port }}
  ProxyPassReverse /api/v1/streaming  ws://127.0.0.1:{{ mastodon_streaming_port }}
  ProxyPass        /                  http://127.0.0.1:{{ mastodon_web_port }}/
  ProxyPassReverse /                  http://127.0.0.1:{{ mastodon_web_port }}/

  ErrorDocument 500 /500.html
  ErrorDocument 501 /500.html
  ErrorDocument 502 /500.html
  ErrorDocument 503 /500.html
  ErrorDocument 504 /500.html