-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path.env.example
More file actions
86 lines (68 loc) · 3.54 KB
/
Copy path.env.example
File metadata and controls
86 lines (68 loc) · 3.54 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
# ==============================================================================
# OpenFrontIO Server Environment Configuration
# ==============================================================================
# Copy this file to .env and fill in your values
#
# Minimal setup (tournaments enabled):
# CONTRACT_ADDRESS, RPC_URL, mnemonic
#
# Full setup (with cloud features):
# Add ADMIN_TOKEN, API_KEY, CF_*, R2_*
# ==============================================================================
# ------------------------------------------------------------------------------
# BLOCKCHAIN CONFIGURATION (Required for Tournaments)
# ------------------------------------------------------------------------------
# Deployed Openfront.sol contract address
# Local Anvil default: 0x5FbDB2315678afecb367f032d93F642f64180aa3
# Base Sepolia testnet: 0x6c7798D58e7851c70FBaAb31F5c9faD37bf2a075
CONTRACT_ADDRESS=0x5FbDB2315678afecb367f032d93F642f64180aa3
# Blockchain RPC endpoint
# Local: http://localhost:8545
# Base Sepolia: https://sepolia.base.org
RPC_URL=http://localhost:8545;
# Server wallet mnemonic (12-24 words)
# Must derive to the address set as gameServer in the contract
# Anvil test mnemonic (DO NOT USE IN PRODUCTION):
mnemonic="test test test test test test test test test test test junk"
# ------------------------------------------------------------------------------
# STORAGE (Optional)
# ------------------------------------------------------------------------------
# File path to persist wallet address ↔ player ID mappings
# If not set, links are stored in-memory only (lost on restart)
WALLET_LINK_FILE=./data/wallet-links.json
# ------------------------------------------------------------------------------
# SECURITY & ADMIN (Optional - Only needed for specific features)
# ------------------------------------------------------------------------------
# Admin API token (only needed for public matchmaking lobbies and remote player kicks)
# If not set, public lobbies can't be created, but private tournaments work fine
# ADMIN_TOKEN=your-secure-random-token-here
# API key for external backend (only needed for game replay archival to external API)
# If not set, replays won't be sent to external storage, but local archival still works
# API_KEY=your-api-key-here
# ------------------------------------------------------------------------------
# CLOUD INFRASTRUCTURE (Not needed for local/basic deployment)
# ------------------------------------------------------------------------------
# Cloudflare configuration (only for production HTTPS tunnels)
# DOMAIN=your-domain.com
# SUBDOMAIN=main
# CF_ACCOUNT_ID=your-cloudflare-account-id
# CF_API_TOKEN=your-cloudflare-api-token
# CF_CONFIG_PATH=/etc/cloudflared/config.yml
# CF_CREDS_PATH=/etc/cloudflared/creds.json
# R2 Storage (only for cloud-based replay storage)
# R2_ACCESS_KEY=your-r2-access-key
# R2_SECRET_KEY=your-r2-secret-key
# R2_BUCKET=openfront-replays
# ------------------------------------------------------------------------------
# MONITORING (Optional - Production only)
# ------------------------------------------------------------------------------
# OpenTelemetry for metrics/tracing
# OTEL_EXPORTER_OTLP_ENDPOINT=https://your-otel-collector:4318
# OTEL_AUTH_HEADER=Bearer your-token
# ------------------------------------------------------------------------------
# DEVELOPMENT
# ------------------------------------------------------------------------------
# Game environment: dev, preprod, or prod
GAME_ENV=dev
# Git commit hash (auto-set by build, manual override for testing)
# GIT_COMMIT=abc123