From b35cd84bf3fd59f24f4d16462b6e81bc277b8eed Mon Sep 17 00:00:00 2001 From: kawa Date: Mon, 9 Mar 2026 22:48:25 +0100 Subject: [PATCH] chore: track .env.example, unignore from .gitignore --- .env.example | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++ .gitignore | 1 + 2 files changed, 57 insertions(+) create mode 100644 .env.example diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..27e0455 --- /dev/null +++ b/.env.example @@ -0,0 +1,56 @@ +# ============================================================ +# CubeAdmin - Environment Variables +# Copy this file to .env.local and fill in your values +# ============================================================ + +# ─── Application ───────────────────────────────────────────── +PORT=3000 +NODE_ENV=development +BETTER_AUTH_URL=http://localhost:3000 + +# Generate with: openssl rand -base64 32 +BETTER_AUTH_SECRET=change-me-with-a-strong-random-secret + +# ─── Email (SMTP) ──────────────────────────────────────────── +SMTP_HOST=smtp.example.com +SMTP_PORT=587 +# Set to true only for port 465 (implicit TLS); false uses STARTTLS +SMTP_SECURE=false +SMTP_USER=your-smtp-username +SMTP_PASS=your-smtp-password +EMAIL_FROM=CubeAdmin + +# ─── Minecraft Server ──────────────────────────────────────── +# Path to the Minecraft server directory on the host +MC_SERVER_PATH=/opt/minecraft/server + +# RCON (Remote Console) - enable in server.properties +MC_RCON_HOST=127.0.0.1 +MC_RCON_PORT=25575 +MC_RCON_PASSWORD=change-me-rcon-password + +# ─── BlueMap (optional 3D map) ─────────────────────────────── +# URL where BlueMap is accessible (leave empty to disable) +BLUEMAP_URL=http://localhost:8100 + +# ─── Database ──────────────────────────────────────────────── +# SQLite database path (relative to project root) +DATABASE_PATH=./data/cubeadmin.db + +# ─── Security ──────────────────────────────────────────────── +# Comma-separated list of trusted origins for CORS/CSRF +TRUSTED_ORIGINS=http://localhost:3000 + +# Rate limiting (requests per minute per IP for API routes) +RATE_LIMIT_RPM=100 + +# ─── First Admin Account (created on first startup) ────────── +INITIAL_ADMIN_EMAIL=admin@example.com +INITIAL_ADMIN_NAME=Administrator +# This password will be required to change on first login +INITIAL_ADMIN_PASSWORD=ChangeMe123! + +# ─── Docker (used in docker-compose.yml) ───────────────────── +# Only needed when running via Docker Compose +MC_DATA_PATH=./mc-data +BACKUPS_PATH=./backups diff --git a/.gitignore b/.gitignore index a50c0a6..212f479 100644 --- a/.gitignore +++ b/.gitignore @@ -33,6 +33,7 @@ yarn-error.log* # env files (can opt-in for committing if needed) .env* +!.env.example # vercel .vercel