Skip to content

Commit

Permalink
fix: add priority to catch traefik rules and pages to errors
Browse files Browse the repository at this point in the history
  • Loading branch information
igr-santos committed Oct 24, 2024
1 parent f4b4aae commit 4ce1f6e
Show file tree
Hide file tree
Showing 7 changed files with 88 additions and 4 deletions.
21 changes: 21 additions & 0 deletions app/org_amazonia_de_pe/adp/map/templates/errors/404.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{% extends "votepeloclima/base.html" %}
{% load static %}

{% block content %}
<section class="container grid">
<div class="bg-screenside d-none d-lg-flex g-col-4">
<div class="screenside" style="background-image:url({% static 'imgs/bg-steps.svg' %});">
</div>
</div>
<div class="d-flex align-items-center g-col-12 g-col-lg-8" style="padding: 115px 0;">
<div class="d-flex flex-column align-items-md-start gap-3">
{% block main %}
<i class="ds-icon-warning"></i>
<h3 class="text-uppercase fw-bold m-0">Página não <br/> encontrada</h3>
<p class="pb-1">Não conseguimos encontrar esta página. Confira se o link está correto. Se o erro persistir, entre em contato com a gente em <a href="mailto:[email protected]" target="_blank" rel="noopener noreferrer">[email protected]</a></p>
<button class="btn btn-secondary text-uppercase" type="button" onclick="window.location.href='/'">Voltar ao início</button>
{% endblock %}
</div>
</div>
</section>
{% endblock %}
7 changes: 7 additions & 0 deletions app/org_amazonia_de_pe/adp/map/templates/errors/500.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{% extends "errors/404.html" %}

{% block main %}
<h1 class="text-uppercase">Erro interno do Servidor</h1>
<p class="pb-3">Houve algum problema no servidor, se o erro persistir entre em contato com [email protected]</p>
<button class="btn btn-secondary text-uppercase" type="button" onclick="window.location.href='/'">Voltar ao início</button>
{% endblock %}
21 changes: 21 additions & 0 deletions app/org_eleicoes/eleicaodoano/eleicao/templates/errors/404.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{% extends "votepeloclima/base.html" %}
{% load static %}

{% block content %}
<section class="container grid">
<div class="bg-screenside d-none d-lg-flex g-col-4">
<div class="screenside" style="background-image:url({% static 'imgs/bg-steps.svg' %});">
</div>
</div>
<div class="d-flex align-items-center g-col-12 g-col-lg-8" style="padding: 115px 0;">
<div class="d-flex flex-column align-items-md-start gap-3">
{% block main %}
<i class="ds-icon-warning"></i>
<h3 class="text-uppercase fw-bold m-0">Página não <br/> encontrada</h3>
<p class="pb-1">Não conseguimos encontrar esta página. Confira se o link está correto. Se o erro persistir, entre em contato com a gente em <a href="mailto:[email protected]" target="_blank" rel="noopener noreferrer">[email protected]</a></p>
<button class="btn btn-secondary text-uppercase" type="button" onclick="window.location.href='/'">Voltar ao início</button>
{% endblock %}
</div>
</div>
</section>
{% endblock %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{% extends "errors/404.html" %}

{% block main %}
<h1 class="text-uppercase">Erro interno do Servidor</h1>
<p class="pb-3">Houve algum problema no servidor, se o erro persistir entre em contato com [email protected]</p>
<button class="btn btn-secondary text-uppercase" type="button" onclick="window.location.href='/'">Voltar ao início</button>
{% endblock %}
21 changes: 21 additions & 0 deletions app/org_nossas/nossas/templates/errors/404.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{% extends "votepeloclima/base.html" %}
{% load static %}

{% block content %}
<section class="container grid">
<div class="bg-screenside d-none d-lg-flex g-col-4">
<div class="screenside" style="background-image:url({% static 'imgs/bg-steps.svg' %});">
</div>
</div>
<div class="d-flex align-items-center g-col-12 g-col-lg-8" style="padding: 115px 0;">
<div class="d-flex flex-column align-items-md-start gap-3">
{% block main %}
<i class="ds-icon-warning"></i>
<h3 class="text-uppercase fw-bold m-0">Página não <br/> encontrada</h3>
<p class="pb-1">Não conseguimos encontrar esta página. Confira se o link está correto. Se o erro persistir, entre em contato com a gente em <a href="mailto:[email protected]" target="_blank" rel="noopener noreferrer">[email protected]</a></p>
<button class="btn btn-secondary text-uppercase" type="button" onclick="window.location.href='/'">Voltar ao início</button>
{% endblock %}
</div>
</div>
</section>
{% endblock %}
7 changes: 7 additions & 0 deletions app/org_nossas/nossas/templates/errors/500.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{% extends "errors/404.html" %}

{% block main %}
<h1 class="text-uppercase">Erro interno do Servidor</h1>
<p class="pb-3">Houve algum problema no servidor, se o erro persistir entre em contato com [email protected]</p>
<button class="btn btn-secondary text-uppercase" type="button" onclick="window.location.href='/'">Voltar ao início</button>
{% endblock %}
8 changes: 4 additions & 4 deletions deploy/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ services:
- ADMINS=${ADMINS:-"('Admin', 'admin@localhost'),"}
labels:
- traefik.enable=true
- traefik.http.routers.eleicaodoano.priority=10
- traefik.http.routers.eleicaodoano.priority=999
- traefik.http.services.eleicaodoano.loadbalancer.server.port=8000
- traefik.http.routers.eleicaodoano.tls=true
- traefik.http.routers.eleicaodoano.tls.certresolver=myresolver
Expand Down Expand Up @@ -82,7 +82,7 @@ services:
- ADMINS=${ADMINS:-"('Admin', 'admin@localhost'),"}
labels:
- traefik.enable=true
- traefik.http.routers.nossas.priority=10
- traefik.http.routers.nossas.priority=999
- traefik.http.services.nossas.loadbalancer.server.port=8000
- traefik.http.routers.nossas.tls=true
- traefik.http.routers.nossas.tls.certresolver=myresolver
Expand All @@ -109,7 +109,7 @@ services:
- ADMINS=${ADMINS:-"('Admin', 'admin@localhost'),"}
labels:
- traefik.enable=true
- traefik.http.routers.observatorio.priority=10
- traefik.http.routers.observatorio.priority=999
- traefik.http.services.observatorio.loadbalancer.server.port=8000
- traefik.http.routers.observatorio.tls=true
- traefik.http.routers.observatorio.tls.certresolver=myresolver
Expand All @@ -127,7 +127,7 @@ services:
- MY_APP_URL_MVT=${ADP_MAPA_URL_MVT}
labels:
- traefik.enable=true
- traefik.http.routers.observatorio-mapa.priority=10
- traefik.http.routers.observatorio-mapa.priority=999
- traefik.http.services.observatorio-mapa.loadbalancer.server.port=80
- traefik.http.routers.observatorio-mapa.tls=true
- traefik.http.routers.observatorio-mapa.tls.certresolver=myresolver
Expand Down

0 comments on commit 4ce1f6e

Please sign in to comment.