Repository navigation
Expand file tree
/
Copy path.env.example
More file actions
111 lines (92 loc) · 4.56 KB
/
Copy path.env.example
File metadata and controls
111 lines (92 loc) · 4.56 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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
# OpenRange configuration template.
# Copy to .env for local development: `cp .env.example .env`.
# The typed validator (packages/config) fails closed on missing values
# in production mode; dev mode fills safe local defaults.
# --- Deployment identity ---
OPENRANGE_ENV=dev # dev | staging | production
OPENRANGE_EDITION=community # community | cluster
OPENRANGE_PUBLIC_URL=http://localhost:3000
# --- Secrets (generate real values before any non-local deployment) ---
# python3 -c "import secrets; print(secrets.token_hex(32))"
OPENRANGE_SECRET_KEY=dev-only-secret-key-change-me-32bytes-minimum-padding
OPENRANGE_FLAG_MASTER_KEY=dev-only-flag-master-key-change-me-0000000000000000
OPENRANGE_DATABASE_URL=postgresql+asyncpg://openrange:openrange@localhost:15432/openrange
OPENRANGE_REDIS_URL=redis://localhost:16379/0
# --- Object storage (MinIO in dev) ---
OPENRANGE_S3_ENDPOINT=http://localhost:19000
OPENRANGE_S3_ACCESS_KEY=openrange-dev
OPENRANGE_S3_SECRET_KEY=openrange-dev-secret
OPENRANGE_S3_BUCKET=openrange
# --- Search ---
OPENRANGE_MEILI_URL=http://localhost:17700
OPENRANGE_MEILI_MASTER_KEY=dev-only-meili-master-key
# --- Lab runtime ---
OPENRANGE_RUNNER_API_URL=http://localhost:8771
OPENRANGE_RUNNER_API_TOKEN=dev-only-runner-token
OPENRANGE_LAB_NETWORK_PREFIX=172.30.0.0/16
OPENRANGE_LAB_DEFAULT_TTL_MINUTES=90
OPENRANGE_LAB_MAX_CONCURRENCY_PER_USER=2
# --- Email (Mailpit in dev; configure SMTP before inviting real users) ---
OPENRANGE_SMTP_HOST=localhost
OPENRANGE_SMTP_PORT=1025
OPENRANGE_SMTP_FROM=no-reply@openrange.local
OPENRANGE_SMTP_TLS=false
# --- Web app (Next.js) ---
# Next.js reads NEXT_PUBLIC_* unprefixed by framework convention
NEXT_PUBLIC_API_URL=http://localhost:8700
# --- Legacy v0 demo stack ---
CTF_BIND=127.0.0.1
PLATFORM_PORT=8000
# =====================================================================
# Production profile (infra/compose/production.yml) - see docs/deployment.md
# Uncomment this block in your real .env and replace every blank secret.
# It is commented so `cp .env.example .env` keeps the dev defaults above.
# Generate secrets with: openssl rand -hex 32
# =====================================================================
# COMPOSE_PROJECT_NAME=openrange-prod
# OPENRANGE_ENV=production
# Public base URL learners browse to (used for links/cookies).
# OPENRANGE_PUBLIC_URL=https://range.example.com
# --- Secrets: REQUIRED, generate fresh values, never commit the real .env ---
# OPENRANGE_SECRET_KEY= # openssl rand -hex 32
# OPENRANGE_FLAG_MASTER_KEY= # openssl rand -hex 32
# OPENRANGE_RUNNER_API_TOKEN= # openssl rand -hex 32
# OPENRANGE_GATEWAY_SECRET= # openssl rand -hex 32
# OPENRANGE_MEILI_MASTER_KEY= # openssl rand -hex 32
# OPENRANGE_S3_ACCESS_KEY= # openssl rand -hex 16 (also MinIO root user)
# OPENRANGE_S3_SECRET_KEY= # openssl rand -hex 32 (also MinIO root password)
# --- Postgres (container + API connection) ---
# POSTGRES_USER=openrange
# POSTGRES_PASSWORD= # openssl rand -hex 32
# POSTGRES_DB=openrange
# Loopback operator port; leave default unless it collides.
# POSTGRES_HOST_PORT=15432
# Internal service URLs are rewritten by production.yml; keep these only if
# you run services outside Compose against managed databases.
# OPENRANGE_DATABASE_URL=postgresql+asyncpg://openrange:CHANGE_ME@postgres:5432/openrange
# OPENRANGE_REDIS_URL=redis://redis:6379/0
# REDIS_HOST_PORT=16379
# --- Object storage / search endpoints ---
# production.yml points the API at its internal MinIO; change only when using
# external S3-compatible storage or a hosted Meilisearch.
# OPENRANGE_S3_BUCKET=openrange
# --- Lab runtime ---
# RUNNER_URL=http://lab-runner:8771
# OPENRANGE_LAB_NETWORK_PREFIX=172.30.0.0/16
# OPENRANGE_LAB_DEFAULT_TTL_MINUTES=90
# OPENRANGE_LAB_MAX_CONCURRENCY_PER_USER=2
# --- Web app ---
# Server-side API origin inside the compose network (overridden by
# production.yml to http://api:8000; document only).
# ORIGIN_API_URL=http://api:8000
# WEB_HOST_PORT=3100
# --- Image overrides (defaults pull from GHCR on `docker compose pull`) ---
# OPENRANGE_API_IMAGE=ghcr.io/<owner>/openrange-api:v1.2.3
# OPENRANGE_WEB_IMAGE=ghcr.io/<owner>/openrange-web:v1.2.3
# OPENRANGE_GATEWAY_IMAGE=ghcr.io/<owner>/openrange-gateway:v1.2.3
# --- Edge / TLS ---
# Empty domain = plain HTTP on loopback (local trials). Set a real DNS name
# pointing at this host and Caddy issues/renews certificates automatically.
# OPENRANGE_DOMAIN=
# CADDY_HTTP_BIND=127.0.0.1:8080 # public installs: 80:80
# CADDY_HTTPS_BIND=127.0.0.1:8443 # public installs: 443:443