leonm 1542a991b9
CI / 🔍 Lint & Type Check (push) Successful in 2m11s
CI / 🐳 Build & Push Image (push) Successful in 1m16s
feat: docs
2026-07-17 16:15:54 +02:00
2026-07-14 17:15:34 +02:00
2026-07-10 21:59:07 +02:00
2026-07-08 18:09:09 +02:00
2026-07-17 16:15:54 +02:00
2026-07-17 16:15:54 +02:00
2026-07-17 16:15:54 +02:00
2026-07-16 17:53:13 +02:00
2026-07-08 20:27:54 +02:00
2026-07-08 20:27:54 +02:00
2026-07-10 23:07:43 +02:00
2026-07-17 16:15:54 +02:00
2026-07-08 15:25:12 +02:00
2026-07-17 16:15:54 +02:00
2026-07-08 15:25:12 +02:00
2026-07-10 21:59:07 +02:00
2026-07-08 20:40:58 +02:00
2026-07-10 23:22:09 +02:00
2026-07-17 16:15:54 +02:00
2026-07-17 16:15:54 +02:00
2026-07-17 16:15:54 +02:00
2026-07-17 16:15:54 +02:00
2026-07-17 16:15:54 +02:00
2026-07-09 09:25:11 +02:00
2026-07-17 16:15:54 +02:00
2026-07-17 16:15: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 ;
  • 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 compose utilise un reseau Docker externe nomme nginx. Cree-le une seule fois sur le serveur si besoin :

docker network create nginx

Le conteneur n'expose pas de port directement sur l'hote. Ton conteneur nginx doit etre sur le meme reseau Docker et proxy vers :

http://landing-server:3000

Exemple de bloc nginx :

server {
    listen 80;
    server_name leonmorival.xyz www.leonmorival.xyz;

    add_header X-Robots-Tag "noindex, nofollow, noarchive, nosnippet, noimageindex" always;

    location / {
        proxy_pass http://landing-server:3000;
        proxy_http_version 1.1;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_cache_bypass $http_upgrade;
    }
}

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%