Christian Boltz f2fe25
include:
Stasiek Michalski e50e27
  {% if salt['grains.get']('include_secrets', True) %}
Stasiek Michalski e50e27
  - secrets.role.web_tsp
Stasiek Michalski e50e27
  {% endif %}
Christian Boltz f2fe25
  - role.common.nginx
Christian Boltz f2fe25
Stasiek Michalski e50e27
profile:
Stasiek Michalski e50e27
  web_tsp:
Christian Boltz 5de857
    database_host: postgresql.infra.opensuse.org
Stasiek Michalski e50e27
    database_user: web_tsp
Stasiek Michalski e50e27
Christian Boltz f2fe25
nginx:
a20cbc
  servers:
a20cbc
    managed:
a20cbc
      tsp.opensuse.org.conf:
a20cbc
        config:
a20cbc
          - upstream tsp:
18c4d4
            - server: unix:///run/tsp/puma.socket
a20cbc
          - server:
68e999
              - listen: '[::]:80 default_server'
a20cbc
              - server_name: tsp.opensuse.org
a20cbc
              - root: /srv/www/travel-support-program/public
a20cbc
              - keepalive_timeout: 5
a20cbc
              - try_files $uri/index.html $uri @tsp
a20cbc
              - location @tsp:
a20cbc
                  - proxy_set_header: X-Forwarded-For $proxy_add_x_forwarded_for
a20cbc
                  - proxy_set_header: Host $http_host
a20cbc
                  - proxy_pass http://tsp
a20cbc
              - error_page: 500 502 503 504 /50x.html
a20cbc
              - location = /50x.html:
a20cbc
                  - root: /srv/www/htdocs
a20cbc
              - access_log: /var/log/nginx/tsp.access.log combined
a20cbc
              - error_log: /var/log/nginx/tsp.error.log
a20cbc
        enabled: True