vienalatina/apps/board/templates/member_created.html
Claude ed6b568d60
Hand the mail settings to the container, and rebuild on deploy
Two silent failures sitting between Phase A and a working invitation.

The compose file never passed MAIL_* through. Compose does not give a
container the contents of .env — it only substitutes into the compose
file — so the settings could be filled in correctly and read by nobody,
with the app reporting mail as unconfigured and the values sitting right
there on disk. test_deployment.py now fails the build whenever
.env.example and docker-compose.yml drift apart, which is how this
happened and how it would happen again.

The app's code is baked into the image (COPY apps /srv/apps), so a pull
followed by --force-recreate runs the old code and says nothing. Added
scripts/deploy-board.sh: rebuild, sync the compose file, restart, print
the log, and name any setting present in .env.example and missing from
the live .env. It never touches .env itself.

Also: "no mail server configured" is now told apart from "the mail
server refused". They want different things done about them, and the
first one sent an admin looking for an SMTP error that never existed.
The new-member form says so before it is filled in rather than after.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NizVpJ2dwzCbjCrTLCjeHn
2026-09-25 18:42:39 +00:00

56 lines
1.8 KiB
HTML

{% extends "base.html" %}
{% block title %}Miembro dado de alta{% endblock %}
{% block main %}
<article class="card">
<h1>{{ login }} ya es {{ role_label|lower }}</h1>
{% if not created %}
<p>No se creó ninguna cuenta nueva: ya existía. Puede entrar con la que tenía.</p>
{% elif invite_link %}
{# The account exists but the invitation never left the building. Showing the
link is the difference between a delayed invitation and a person who
simply never gets in. #}
{% if mail_problem == 'unconfigured' %}
<p class="flash">
Este servidor todavía no envía correo. Pásale este enlace por un canal
privado — sirve una sola vez y caduca en 7 días.
</p>
{% else %}
<p class="flash flash--error">
No se pudo enviar el correo: el servidor de correo rechazó el envío o no
respondió. Pásale este enlace por un canal privado — sirve una sola vez y
caduca en 7 días.
</p>
{% endif %}
<p class="password mono">{{ invite_link }}</p>
<p class="muted small">
{% if mail_problem == 'unconfigured' %}
Añade los valores <span class="mono">MAIL_*</span> en
<span class="mono">/srv/board/.env</span> para que la próxima invitación
salga sola.
{% else %}
Revisa la configuración de correo del servidor para que la próxima
invitación salga sola.
{% endif %}
</p>
{% else %}
<p>
Le enviamos un correo a <span class="mono">{{ email }}</span> con un enlace
para elegir su contraseña.
</p>
<p class="muted small">
El enlace caduca en 7 días y sirve una sola vez. Nadie conoce su contraseña
— ni tú ni el servidor — hasta que la elija. Si no llega, que mire en spam,
o pídele que use «¿olvidaste tu contraseña?».
</p>
{% endif %}
<div class="actions">
<a class="btn" href="{{ url_for('members.index') }}">Volver a miembros</a>
</div>
</article>
{% endblock %}