Files
2026-03-26 15:25:17 +03:30

1.6 KiB

Environment Variables

This document describes all environment variables needed for the frontend application.

Required Environment Variables

Server Configuration

  • PORT - Server port (default: 9031)
  • NODE_ENV - Node environment (production/development)

Next.js Configuration

  • BASEPATH - Base path for Next.js application (optional, leave empty for root)
  • NEXT_PUBLIC_APP_URL - Public URL of the application (e.g., http://localhost:9031)
  • NEXT_PUBLIC_DOCS_URL - Documentation URL (optional)

API Configuration

  • NEXT_PUBLIC_API_URL - Public API URL for browser-side frontend requests (e.g., http://85.208.253.135:8000)
    • Use this for anything that runs in the browser
  • ENVOY_GATEWAY_URL - Server-side fallback API URL
    • This is only available in Next.js server runtime and is not exposed to the browser
    • Defaults to http://85.208.253.135:8000 if neither variable is set

Optional Environment Variables

Mapbox

  • MAPBOX_ACCESS_TOKEN - Mapbox access token for map features

Example .env file

# Server Configuration
PORT=9031
NODE_ENV=production

# Next.js Configuration
BASEPATH=
NEXT_PUBLIC_APP_URL=http://localhost:9031
NEXT_PUBLIC_DOCS_URL=https://demos.themeselection.com

# API Configuration (Envoy Gateway)
NEXT_PUBLIC_API_URL=http://85.208.253.135:8000
# Alternative: ENVOY_GATEWAY_URL=http://85.208.253.135:8000

# Mapbox (Optional - for map features)
MAPBOX_ACCESS_TOKEN=your-mapbox-access-token

Docker Configuration

When using Docker, these environment variables are set in docker-compose.yaml. For local development, create a .env file in the frontend directory with the values above.