2026-07-08 20:27:54 +02:00
2026-07-08 20:27:54 +02:00
2026-07-08 18:09:09 +02:00
2026-07-08 20:27:54 +02:00
2026-07-08 18:39:10 +02:00
2026-07-08 20:27:54 +02:00
2026-07-08 20:27:54 +02:00
2026-07-08 20:27:54 +02:00
2026-07-08 19:18:50 +02:00
2026-07-08 15:25:12 +02:00
2026-07-08 15:25:12 +02:00
2026-07-08 15:25:12 +02:00
2026-07-08 20:27:54 +02:00
2026-07-08 20:27:54 +02:00
2026-07-08 20:27:54 +02:00
2026-07-08 20:27:54 +02:00
2026-07-08 20:27:54 +02:00

Landing Server

Site Next.js pour les services de leonmorival.xyz.

Minecraft whitelist

La page Minecraft contient un formulaire de candidature. Une demande valide envoie uniquement une notification dans le webhook configure avec :

  • le pseudo Minecraft ;
  • l'identifiant Discord renseigne ;
  • le message du joueur.

Le site ne modifie pas directement la whitelist Minecraft.

Variable necessaire :

DISCORD_WHITELIST_WEBHOOK_URL="https://discord.com/api/webhooks/..."

Developpement

npm install
npm run dev

Ouvre ensuite http://localhost:3000.

Production Docker

Le plus simple sans CI/CD : le serveur clone le repo, puis Docker build et lance l'app.

git pull --ff-only
docker compose up -d --build

Le fichier .env du serveur doit contenir :

DISCORD_WHITELIST_WEBHOOK_URL="https://discord.com/api/webhooks/..."

Le conteneur expose l'app uniquement sur 127.0.0.1:3000, pour la mettre derriere nginx.

Auto-update simple

Le script scripts/update-from-git-docker.sh verifie si origin/main a un nouveau commit. Si oui, il fait :

git pull --ff-only
docker compose up -d --build --remove-orphans

Sur Ubuntu, tu peux l'appeler toutes les minutes avec un timer systemd :

# /etc/systemd/system/landing-server-update.service
[Unit]
Description=Update landing-server from Git

[Service]
Type=oneshot
Environment=APP_DIR=/var/www/landing-server
Environment=BRANCH=main
ExecStart=/var/www/landing-server/scripts/update-from-git-docker.sh
# /etc/systemd/system/landing-server-update.timer
[Unit]
Description=Check landing-server Git updates

[Timer]
OnBootSec=2min
OnUnitActiveSec=1min
Persistent=true

[Install]
WantedBy=timers.target

Puis :

sudo chmod +x /var/www/landing-server/scripts/update-from-git-docker.sh
sudo systemctl daemon-reload
sudo systemctl enable --now landing-server-update.timer
S
Description
No description provided
Readme 4 MiB
Languages
MDX 48%
TypeScript 26.4%
CSS 24.3%
Dockerfile 0.6%
JavaScript 0.4%
Other 0.3%