3 次代码提交 b0fc3d8fef ... eecc7ed247

作者 SHA1 备注 提交日期
  Code_Uwe eecc7ed247 RHL-005-fix(env): update SESSION_SECRET placeholder in example environment files 2 天之前
  Code_Uwe 3bf9d986f5 RHL-005-feat(env): add example environment configuration files for Docker and local development 2 天之前
  Code_Uwe e2537daaec RHL-005-refactor(gitignore): allow committing example environment files 2 天之前
共有 3 个文件被更改,包括 47 次插入0 次删除
  1. 22 0
      .env.docker.example
  2. 24 0
      .env.local.example
  3. 1 0
      .gitignore

+ 22 - 0
.env.docker.example

@@ -0,0 +1,22 @@
+# Docker-based deployment (docker-compose)
+# Copy this file to ".env.docker" and adjust values.
+#
+# NOTE: Never commit real secrets. Use placeholders in this example file.
+
+# MongoDB connection string inside the docker-compose network.
+# "mongo" should match the MongoDB service name in docker-compose.yml.
+MONGODB_URI=mongodb://mongo:27017/rhl_lieferscheine
+
+# Secret used to sign session JWT cookies.
+# Requirements: strong + random, at least 32 characters, never committed.
+# Example generation:
+#   openssl rand -base64 48
+SESSION_SECRET=replace-me-with-a-long-random-secret-string-at-least-32-chars
+
+# Must match the mount target inside the app container (read-only mount recommended).
+NAS_ROOT_PATH=/mnt/niederlassungen
+
+NODE_ENV=production
+
+# Optional. Only needed if you run the app on a non-default port.
+# PORT=3000

+ 24 - 0
.env.local.example

@@ -0,0 +1,24 @@
+# Local development (Next.js dev server)
+# Copy this file to ".env.local" and adjust values.
+#
+# NOTE: Never commit real secrets. Use placeholders in this example file.
+
+# MongoDB connection string (local dev).
+# Expected format: mongodb://... OR mongodb+srv://...
+MONGODB_URI=mongodb://localhost:27017/rhl_lieferscheine
+
+# Secret used to sign session JWT cookies.
+# Requirements: strong + random, at least 32 characters, never committed.
+# Example generation:
+#   openssl rand -base64 48
+SESSION_SECRET=replace-me-with-a-long-random-secret-string-at-least-32-chars
+
+# Absolute Unix path to the NAS root folder that contains branch directories (NLxx/...).
+# For local dev you can point this to a local fixture folder.
+NAS_ROOT_PATH=/mnt/niederlassungen
+
+# Optional. Next.js dev usually sets this, but keeping it explicit is fine.
+NODE_ENV=development
+
+# Optional. Only needed if you want a custom port for your local server.
+# PORT=3000

+ 1 - 0
.gitignore

@@ -32,6 +32,7 @@ yarn-error.log*
 
 # env files (can opt-in for committing if needed)
 .env*
+!.env*.example
 
 # vercel
 .vercel