11vo Commit
This commit is contained in:
parent
509d0628c4
commit
ee88c8e963
6 changed files with 310 additions and 25 deletions
|
|
@ -10,6 +10,7 @@ dist
|
|||
|
||||
# runtime y tests
|
||||
uploads
|
||||
backups
|
||||
test
|
||||
coverage
|
||||
*.log
|
||||
|
|
|
|||
19
Dockerfile
19
Dockerfile
|
|
@ -25,6 +25,20 @@ RUN pnpm install --frozen-lockfile --prod
|
|||
FROM node:22-bookworm-slim AS runtime
|
||||
ENV NODE_ENV=production
|
||||
WORKDIR /app
|
||||
|
||||
# Cliente PostgreSQL (pg_dump / psql) que usan Mantenimiento → generar y
|
||||
# restaurar respaldos. Versión 16 = servidor del stack openwa
|
||||
# (postgres:16-alpine); el cliente de bookworm (15) no puede dumper 16.
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends ca-certificates curl \
|
||||
&& curl -fsSL https://www.postgresql.org/media/keys/ACCC4CF8.asc -o /tmp/pgdg.asc \
|
||||
&& install -D -m 644 /tmp/pgdg.asc /usr/share/postgresql-common/pgdg/apt.postgresql.org.asc \
|
||||
&& . /etc/os-release \
|
||||
&& echo "deb [signed-by=/usr/share/postgresql-common/pgdg/apt.postgresql.org.asc] https://apt.postgresql.org/pub/repos/apt ${VERSION_CODENAME}-pgdg main" > /etc/apt/sources.list.d/pgdg.list \
|
||||
&& apt-get update \
|
||||
&& apt-get install -y --no-install-recommends postgresql-client-16 \
|
||||
&& rm -rf /var/lib/apt/lists/* /tmp/pgdg.asc
|
||||
|
||||
COPY --from=prod-deps /app/node_modules ./node_modules
|
||||
COPY --from=build /app/dist ./dist
|
||||
# logos de los reportes PDF (se resuelven con process.cwd() + /assets)
|
||||
|
|
@ -33,7 +47,10 @@ COPY assets ./assets
|
|||
COPY public ./public
|
||||
# package.json se copia porque dist/*.js son ESM ("type": "module")
|
||||
COPY package.json ./
|
||||
RUN mkdir -p uploads && chown -R node:node /app
|
||||
# uploads (fotos de personas + PDFs de reportes) y backups/ se montan como
|
||||
# volumen en docker-compose: crearlos acá en la imagen deja el ownership en
|
||||
# node, que si no el volumen vacío nace root y la app no puede escribir.
|
||||
RUN mkdir -p uploads backups && chown -R node:node /app
|
||||
USER node
|
||||
EXPOSE 4002
|
||||
# /docs-json (Swagger, exento de auth) responde 200 cuando la app está arriba
|
||||
|
|
|
|||
|
|
@ -10,10 +10,20 @@ services:
|
|||
- .env
|
||||
environment:
|
||||
TZ: America/La_Paz
|
||||
# Persistencia fuera del contenedor: `docker compose down` no borra
|
||||
# volúmenes nombrados (sí `down -v`). uploads = fotos de personas y
|
||||
# PDFs de reportes; backups = respaldos .sql de Mantenimiento.
|
||||
volumes:
|
||||
- backups:/app/backups
|
||||
- uploads:/app/uploads
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- red_postgres
|
||||
|
||||
volumes:
|
||||
backups:
|
||||
uploads:
|
||||
|
||||
networks:
|
||||
red_postgres:
|
||||
external: true
|
||||
|
|
|
|||
BIN
public/assets/Ser-Logo.png
Normal file
BIN
public/assets/Ser-Logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 169 KiB |
BIN
public/assets/ser.png
Normal file
BIN
public/assets/ser.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 42 KiB |
|
|
@ -2,30 +2,287 @@
|
|||
<html lang="es">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Página de Descargas</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="description" content="MinSer — Ministerio Ser. Descargá la app de asistencia, turnos, reemplazos y apoyos.">
|
||||
<title>MinSer · Descargas</title>
|
||||
<link rel="icon" type="image/png" href="assets/ser.png">
|
||||
<link rel="apple-touch-icon" href="assets/ser.png">
|
||||
<style>
|
||||
/* Estilos básicos para que parezca un botón */
|
||||
.boton-descarga {
|
||||
display: inline-block;
|
||||
padding: 10px 20px;
|
||||
background-color: #007bff;
|
||||
color: white;
|
||||
text-decoration: none;
|
||||
border-radius: 5px;
|
||||
font-family: Arial, sans-serif;
|
||||
font-weight: bold;
|
||||
:root {
|
||||
--bg: #f4f7fb;
|
||||
--ink: #0e1b2c;
|
||||
--muted: #56677d;
|
||||
--brand: #1f5f96;
|
||||
--brand-dark: #174973;
|
||||
--surface: #ffffff;
|
||||
--store: #0b0f14;
|
||||
--store-hover: #1c242e;
|
||||
--radius-card: 24px;
|
||||
--radius-pill: 999px;
|
||||
--shadow: 0 24px 48px -24px rgba(14, 27, 44, 0.28), 0 4px 12px rgba(14, 27, 44, 0.06);
|
||||
}
|
||||
.boton-descarga:hover {
|
||||
background-color: #0056b3;
|
||||
|
||||
* { box-sizing: border-box; margin: 0; padding: 0; }
|
||||
|
||||
body {
|
||||
min-height: 100vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 24px;
|
||||
padding: 40px 20px;
|
||||
background:
|
||||
radial-gradient(1000px 500px at 50% -10%, rgba(31, 95, 150, 0.14), transparent 60%),
|
||||
var(--bg);
|
||||
color: var(--ink);
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
|
||||
"Helvetica Neue", Arial, sans-serif;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
}
|
||||
|
||||
.card {
|
||||
width: 100%;
|
||||
max-width: 560px;
|
||||
background: var(--surface);
|
||||
border-radius: var(--radius-card);
|
||||
box-shadow: var(--shadow);
|
||||
padding: 44px 40px 36px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* Logo oficial (assets/Ser-Logo.png): tile oscuro ya redondeado */
|
||||
.logo {
|
||||
display: block;
|
||||
width: min(280px, 78%);
|
||||
height: auto;
|
||||
margin: 0 auto 22px;
|
||||
border-radius: 16px;
|
||||
filter: drop-shadow(0 14px 26px rgba(14, 27, 44, 0.28));
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 42px;
|
||||
font-weight: 800;
|
||||
letter-spacing: -0.03em;
|
||||
line-height: 1.05;
|
||||
}
|
||||
|
||||
.tagline {
|
||||
margin-top: 10px;
|
||||
font-size: 16px;
|
||||
line-height: 1.5;
|
||||
color: var(--muted);
|
||||
}
|
||||
|
||||
.chips {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: center;
|
||||
gap: 8px;
|
||||
margin-top: 18px;
|
||||
}
|
||||
|
||||
.chip {
|
||||
font-size: 12.5px;
|
||||
font-weight: 600;
|
||||
color: var(--brand);
|
||||
background: rgba(31, 95, 150, 0.1);
|
||||
border-radius: var(--radius-pill);
|
||||
padding: 6px 12px;
|
||||
}
|
||||
|
||||
/* Botón principal: descarga APK */
|
||||
.descarga {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 10px;
|
||||
width: 100%;
|
||||
margin-top: 28px;
|
||||
padding: 16px 20px;
|
||||
background: var(--brand);
|
||||
color: #fff;
|
||||
text-decoration: none;
|
||||
font-size: 17px;
|
||||
font-weight: 700;
|
||||
border-radius: 16px;
|
||||
transition: background 0.15s ease, transform 0.15s ease;
|
||||
}
|
||||
|
||||
.descarga:hover { background: var(--brand-dark); transform: translateY(-1px); }
|
||||
.descarga:active { transform: translateY(0); }
|
||||
.descarga .meta { font-weight: 500; opacity: 0.75; font-size: 14px; }
|
||||
|
||||
.divider {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 14px;
|
||||
margin: 26px 0 16px;
|
||||
color: var(--muted);
|
||||
font-size: 13px;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.08em;
|
||||
}
|
||||
|
||||
.divider::before,
|
||||
.divider::after {
|
||||
content: "";
|
||||
flex: 1;
|
||||
height: 1px;
|
||||
background: #e2e8f0;
|
||||
}
|
||||
|
||||
/* Botones de tiendas */
|
||||
.tiendas {
|
||||
display: flex;
|
||||
gap: 12px;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.tienda {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 10px;
|
||||
padding: 12px 14px;
|
||||
background: var(--store);
|
||||
color: #fff;
|
||||
border: none;
|
||||
border-radius: 14px;
|
||||
cursor: pointer;
|
||||
font-family: inherit;
|
||||
text-align: left;
|
||||
transition: background 0.15s ease, transform 0.15s ease;
|
||||
}
|
||||
|
||||
.tienda:hover { background: var(--store-hover); transform: translateY(-1px); }
|
||||
.tienda:active { transform: translateY(0); }
|
||||
.tienda svg { flex: none; }
|
||||
|
||||
.tienda .txt { display: flex; flex-direction: column; line-height: 1.15; }
|
||||
.tienda .peque { font-size: 10.5px; opacity: 0.72; letter-spacing: 0.02em; }
|
||||
.tienda .grande { font-size: 15.5px; font-weight: 700; letter-spacing: -0.01em; }
|
||||
|
||||
.nota {
|
||||
margin-top: 22px;
|
||||
font-size: 13px;
|
||||
color: var(--muted);
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
footer {
|
||||
font-size: 12.5px;
|
||||
color: var(--muted);
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* Toast */
|
||||
#toast {
|
||||
position: fixed;
|
||||
left: 50%;
|
||||
bottom: 32px;
|
||||
transform: translate(-50%, 16px);
|
||||
background: var(--ink);
|
||||
color: #fff;
|
||||
font-size: 14.5px;
|
||||
font-weight: 600;
|
||||
white-space: nowrap;
|
||||
max-width: calc(100vw - 40px);
|
||||
padding: 12px 22px;
|
||||
border-radius: var(--radius-pill);
|
||||
box-shadow: 0 12px 32px -8px rgba(14, 27, 44, 0.45);
|
||||
opacity: 0;
|
||||
pointer-events: none;
|
||||
transition: opacity 0.25s ease, transform 0.25s ease;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
#toast.visible { opacity: 1; transform: translate(-50%, 0); }
|
||||
|
||||
@media (max-width: 480px) {
|
||||
.card { padding: 36px 24px 30px; }
|
||||
h1 { font-size: 34px; }
|
||||
.tiendas { flex-direction: column; }
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Bienvenido a mi servidor</h1>
|
||||
<main class="card">
|
||||
<img class="logo" src="assets/Ser-Logo.png" alt="Logo de Ser — Ministerio Ser">
|
||||
|
||||
<!-- El atributo "download" hace la magia -->
|
||||
<a href="/descargas/app-ser-101.apk" download="app-ser-101.apk" class="boton-descarga">
|
||||
📥 Descargar Documento
|
||||
<h1>MinSer</h1>
|
||||
<p class="tagline">
|
||||
Ministerio Ser — control de asistencia, turnos, reemplazos y apoyos
|
||||
para tu congregación.
|
||||
</p>
|
||||
|
||||
<div class="chips" aria-hidden="true">
|
||||
<span class="chip">Marcado QR · PIN · GPS</span>
|
||||
<span class="chip">Reportes en PDF</span>
|
||||
<span class="chip">Multi-equipo</span>
|
||||
</div>
|
||||
|
||||
<!-- Descarga directa del APK -->
|
||||
<a class="descarga" href="/descargas/app-ser-101.apk" download="app-ser-101.apk">
|
||||
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true">
|
||||
<path d="M12 3v11m0 0l-4.5-4.5M12 14l4.5-4.5" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2" stroke="currentColor" stroke-width="2.2" stroke-linecap="round"/>
|
||||
</svg>
|
||||
<span>Descargar APK</span>
|
||||
<span class="meta">· 77 MB</span>
|
||||
</a>
|
||||
|
||||
<div class="divider">o consíguela en</div>
|
||||
|
||||
<div class="tiendas">
|
||||
<button type="button" class="tienda" onclick="mostrarToast('Pronto en esta tienda')">
|
||||
<!-- Google Play -->
|
||||
<svg width="26" height="26" viewBox="0 0 24 24" aria-hidden="true">
|
||||
<path fill="#00E28B" d="M3.609 1.814L13.792 12 3.61 22.186a.996.996 0 0 1-.61-.92V2.734a1 1 0 0 1 .609-.92z"/>
|
||||
<path fill="#00C3FF" d="M14.5 12.9l2.7 2.7-10.94 6.33L14.5 12.9z"/>
|
||||
<path fill="#FFCE00" d="M17.2 9.1l2.31 1.34c.8.46.8 1.6 0 2.06L17.2 13.85 14.5 11 17.2 9.1z"/>
|
||||
<path fill="#FF3A44" d="M6.26 2.07L17.2 9.1 14.5 11 6.26 2.07z"/>
|
||||
</svg>
|
||||
<span class="txt">
|
||||
<span class="peque">Disponible pronto en</span>
|
||||
<span class="grande">Google Play</span>
|
||||
</span>
|
||||
</button>
|
||||
|
||||
<button type="button" class="tienda" onclick="mostrarToast('Pronto en esta tienda')">
|
||||
<!-- App Store (Apple) -->
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="#fff" aria-hidden="true">
|
||||
<path d="M12.152 6.896c-.948 0-2.415-1.078-3.96-1.04-2.04.027-3.91 1.183-4.961 3.014-2.117 3.675-.546 9.103 1.519 12.09 1.013 1.454 2.208 3.09 3.792 3.03 1.52-.065 2.09-.987 3.935-.987 1.831 0 2.35.987 3.96.948 1.637-.026 2.676-1.48 3.676-2.948 1.156-1.688 1.636-3.325 1.662-3.415-.039-.013-3.182-1.221-3.22-4.857-.026-3.04 2.48-4.494 2.597-4.559-1.429-2.09-3.623-2.324-4.39-2.376-2-.156-3.675 1.09-4.61 1.09zM15.53 3.83c.843-1.012 1.4-2.427 1.245-3.83-1.207.052-2.662.805-3.532 1.818-.78.896-1.454 2.338-1.273 3.714 1.338.104 2.715-.688 3.56-1.702"/>
|
||||
</svg>
|
||||
<span class="txt">
|
||||
<span class="peque">Próximamente en el</span>
|
||||
<span class="grande">App Store</span>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<p class="nota">
|
||||
El APK es la descarga directa para Android (instalá desde fuentes
|
||||
desconocidas cuando te lo pida). Las versiones oficiales de tienda
|
||||
llegarán pronto.
|
||||
</p>
|
||||
</main>
|
||||
|
||||
<footer>MinSer · Ministerio Ser</footer>
|
||||
|
||||
<div id="toast" role="status" aria-live="polite"></div>
|
||||
|
||||
<script>
|
||||
let temporizador;
|
||||
function mostrarToast(mensaje) {
|
||||
const toast = document.getElementById('toast');
|
||||
toast.textContent = mensaje;
|
||||
toast.classList.add('visible');
|
||||
clearTimeout(temporizador);
|
||||
temporizador = setTimeout(() => toast.classList.remove('visible'), 2600);
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Add table
Reference in a new issue