Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# ==============================================================================
# F1-DASH ROOT ENVIRONMENT VARIABLES
# ==============================================================================
# INSTRUCTIONS: Copy or rename this file to `.env` in the root directory
# before running the application.
#
# This file defines the environment variables required to run all components
# of the application (dashboard, api, realtime, and simulator) either locally
# or via Docker Compose.
# ==============================================================================

# --- DASHBOARD CONFIGURATION (Next.js) ---
# Default dashboard port for local development
PORT=3000

# Realtime connection URL (SSE) that the client (browser) will connect to
NEXT_PUBLIC_LIVE_URL=http://localhost:4000

# API URL the dashboard will connect to for historical/session data
# - If run locally without Docker (using Cargo/Rust): http://localhost:4001
# - If run with Docker Compose: http://localhost:4010
API_URL=http://localhost:4001


# --- API CONFIGURATION (Rust Axum Service) ---
# IP address and port where the API service will listen for requests
API_ADDRESS=127.0.0.1:4001

# Logging level for the API
API_RUST_LOG=api=info

# Allowed CORS origin (Dashboard access URL)
API_ORIGIN=http://localhost:3000


# --- REALTIME SERVICE CONFIGURATION (Rust Axum + SignalR Client) ---
# IP address and port where the realtime server will listen for requests
REALTIME_ADDRESS=127.0.0.1:4000

# Logging level for the Realtime service
REALTIME_RUST_LOG=realtime=info

# Allowed CORS origin (Dashboard access URL)
REALTIME_ORIGIN=http://localhost:3000

# (Optional) URL for the local F1 simulator in development.
# If defined, the realtime service will connect to the local simulator instead of the official F1 API.
# F1_DEV_URL=ws://127.0.0.1:8000/ws


# --- SIMULATOR CONFIGURATION (Rust replay tool) ---
# IP address and port where the F1 simulator will serve websocket connections in replay mode
SIMULATOR_ADDRESS=127.0.0.1:8000
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ compose.env

# compiled
**/target
**/.txt

# data
*.data.*
*.txt
*.sh
17 changes: 17 additions & 0 deletions api/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# ==============================================================================
# F1-DASH API SERVICE ENVIRONMENT VARIABLES
# ==============================================================================
# INSTRUCTIONS: Copy or rename this file to `.env` in this directory
# (or export these variables in your terminal) before running the API server.
# ==============================================================================

# IP address and port where the API server will listen for connections.
# Defaults to 0.0.0.0:80 if undefined, but use a free alternative port for local development.
ADDRESS=127.0.0.1:4001

# Allowed CORS origins (URL to access the dashboard). Must match the client URL.
# If there are multiple, separate them with semicolons (;).
ORIGIN=http://localhost:3000

# Logging level for the api service (error, warn, info, debug, trace)
RUST_LOG=api=info
24 changes: 19 additions & 5 deletions dashboard/.env.example
Original file line number Diff line number Diff line change
@@ -1,15 +1,29 @@
# -- runtime envs --
# ==============================================================================
# F1-DASH DASHBOARD ENVIRONMENT VARIABLES
# ==============================================================================
# INSTRUCTIONS: Copy or rename this file to `.env` or `.env.local`
# in this directory before starting the dashboard in development mode.
# ==============================================================================

# --- runtime envs ---

# URL of the Realtime service (SSE / Websockets server) to which the client browser will connect
NEXT_PUBLIC_LIVE_URL=http://localhost:4000

# URL of the REST API to query static information, schedules, etc.
# - If you run the API locally using Cargo/Rust: http://localhost:4001
# - If you run the API using Docker Compose by default: http://localhost:4010
API_URL=http://localhost:4001

# Disable iframe (optional)
# DISABLE_IFRAME=0

# rybbit tracking script and id (optional for analytics)
# TRACKING_ID=
# TRACKING_URL=

# -- build envs --
# --- build envs ---

# SKIP_ENV_VALIDATION=1 # skips env validation, use for docker
# NEXT_STANDALONE=1 # enables nextjs standalone build, use for docker
# NEXT_NO_COMPRESS=1 # disables nextjs compression, use when using proxy compression
# SKIP_ENV_VALIDATION=1 # Skip environment variable validation during build (useful for Docker)
# NEXT_STANDALONE=1 # Enable Next.js standalone build (useful for Docker)
# NEXT_NO_COMPRESS=1 # Disable Next.js compression (if using a reverse proxy)
Loading