-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
95 lines (75 loc) · 3.02 KB
/
Copy path.env.example
File metadata and controls
95 lines (75 loc) · 3.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# Adventure MUD - Environment Variables Example
#
# Copy this file to .env and fill in the appropriate values for your environment.
# Lines starting with '#' are comments.
#
# QUICK START WITH DOCKER:
# 1. cp .env.example .env
# 2. docker-compose up -d
# 3. Visit http://localhost:5001
#
# SECURITY NOTE:
# - Never commit your real SECRET_KEY or production database credentials.
# - Generate a secure SECRET_KEY for production!
# ============================================
# REQUIRED - Database Configuration
# ============================================
# PostgreSQL connection string (REQUIRED)
# Format: postgresql://username:password@host:port/database
#
# For Docker (default ports exposed):
DATABASE_URL=postgresql://adventure:changeme@localhost:5433/adventure
#
# For local PostgreSQL (standard port):
# DATABASE_URL=postgresql://adventure:changeme@localhost:5432/adventure
#
# For production, use a strong password and consider connection pooling
# PostgreSQL password (used by docker-compose)
POSTGRES_PASSWORD=changeme
# ============================================
# REQUIRED - Security
# ============================================
# Flask secret key (used for session signing and CSRF protection)
# Generate a secure key with: python -c "import secrets; print(secrets.token_hex(32))"
# Or: python -c "import secrets; print(secrets.token_urlsafe(32))"
SECRET_KEY=dev-secret-key-change-in-production
# ============================================
# OPTIONAL - Server Configuration
# ============================================
# Server bind address and port (only for direct python run.py execution)
HOST=0.0.0.0
PORT=5000
# Flask environment
FLASK_ENV=production
FLASK_DEBUG=0
# ============================================
# OPTIONAL - Application Settings
# ============================================
# Logging level (DEBUG, INFO, WARNING, ERROR, CRITICAL)
LOG_LEVEL=INFO
# Max upload size (bytes)
MAX_CONTENT_LENGTH=16777216 # 16MB
# CORS settings for Socket.IO
# Unset = same-origin only (recommended). Set a comma-separated origin list
# to allow specific cross-origin clients, or '*' to disable the check (dev only).
# CORS_ALLOWED_ORIGINS=https://example.com
# Session cookie Secure flag: defaults to 1 when FLASK_ENV=production.
# Only set to 0 if you genuinely cannot terminate TLS in front of the app.
# SESSION_COOKIE_SECURE=1
# SocketIO async mode (auto-detects if not set)
# Options: gevent, threading
# SOCKETIO_ASYNC_MODE=gevent
# Enable SocketIO debug logging (very noisy; off by default)
ENGINEIO_LOGGER=0
# ============================================
# OPTIONAL - Dungeon Generation
# ============================================
# Allow hidden areas in dungeon generation
DUNGEON_ALLOW_HIDDEN_AREAS=0
# Enable dungeon generation metrics tracking
DUNGEON_ENABLE_GENERATION_METRICS=1
# ============================================
# OPTIONAL - Testing
# ============================================
# Separate database for running tests (recommended)
TEST_DATABASE_URL=postgresql://adventure:changeme@localhost:5433/adventure_test