Skip to content

Environment variables

This page lists all the environment variables used by PerfShop. The reference is the .env.example file at the root of the repository, supplemented by the variables injected by docker-compose.yml into certain services.

Source

.env.example, docker-compose.yml, docker-compose.desktop.yml, docker-compose.build.yml

Philosophy

PerfShop follows the 12-factor app principle: all configuration goes through environment variables. No sensitive value (password, key, token) is hard-coded in the code or in the images. The .env file (copied from .env.example on first deployment) centralizes everything and is never committed.

The variables are grouped below by theme.

Version and instance identity

Variable Type Default Role
PERFSHOP_VERSION string 0.1.0-beta Version displayed in the UIs and logs
PERFSHOP_INSTANCE_UUID string (empty) Optional UUID for unique instance identification
PERFSHOP_IO_URL url https://perfshop.io URL of the official portal — used for license purchase links
HOST_IP string localhost Host IP used by the welcome page in ip mode

Language

Variable Type Default Role
PERFSHOP_LANG fr, en, … fr Active language of the entire stack (see i18n overview)
PERFSHOP_UI_LOCALE locale fr-FR Derived locale used for date formatting in some UIs

Public URLs

These are the URLs that the browser uses to call the APIs. In ip mode (Docker Desktop, local Unix), the default values point at localhost with the exposed ports. In dns mode (NAS, production), they are replaced with the actual HTTPS subdomains.

Variable Default Target service
PUBLIC_API_URL http://localhost:9080 Spring Boot backend
PUBLIC_FRONTEND_URL http://localhost:9091 React shop frontend
PUBLIC_MONITORING_URL http://localhost:3001 Monitoring HTML dashboard
PUBLIC_GRAFANA_URL http://localhost:3002 Grafana
PUBLIC_CHAOS_URL http://localhost:3003 chaos-admin (panel + student page)
PUBLIC_ADMIN_URL http://localhost:3004 Admin backoffice
PUBLIC_DOCS_URL http://localhost:9087 MkDocs documentation
PUBLIC_JMETER_URL http://localhost:3005 JMeter UI
PUBLIC_SQUASH_URL http://localhost:9086 Squash TM
PUBLIC_SELENIUM_VNC_URL http://localhost:7900 Selenium VNC viewer
PUBLIC_FILES_URL http://localhost:3007 Filebrowser
PUBLIC_FORGEJO_URL http://localhost:3009 Forgejo (self-hosted Git)
PUBLIC_SCRIPTS_URL http://localhost:3008 Scripts UI
PUBLIC_OPENSEARCH_URL http://localhost:5601 OpenSearch Dashboards
Variable Default Role
PERFSHOP_FRONTEND_INTERNAL http://perfshop-frontend Internal URL (Docker network) of the frontend, used by scrapers and health checks

Ports exposed on the host machine

These variables control only the Docker Compose port mappings to the host. Changing these values has no impact on internal communications between containers.

Variable Default Service
BACKEND_HTTP_PORT 9080 Spring Boot backend
BACKEND_METRICS_PORT 9090 Management / actuator (heap dump) — internal Docker
FRONTEND_HTTP_PORT 9091 Nginx frontend
MONITORING_HTTP_PORT 3001 Node.js monitoring
GRAFANA_HTTP_PORT 3002 Grafana
PROMETHEUS_HTTP_PORT 9092 Prometheus
CHAOS_HTTP_PORT 3003 chaos-admin
ADMIN_HTTP_PORT 3004 Admin backoffice
LOKI_HTTP_PORT 19100 Loki — ⚠️ port 3100 reserved by Hyper-V/WSL2 on Windows
DOCS_HTTP_PORT 9087 MkDocs documentation
TEMPO_HTTP_PORT 19200 Tempo query — ⚠️ port 3200 reserved by Hyper-V/WSL2 on Windows
TEMPO_OTLP_GRPC_PORT 4317 Tempo OTLP gRPC ingress
TEMPO_OTLP_HTTP_PORT 4318 Tempo OTLP HTTP ingress
PYROSCOPE_HTTP_PORT 4040 Pyroscope
SQUASH_HTTP_PORT 9086 Squash TM (Docker Desktop rule: no 80xx)
SQUASH_DB_PORT 5433 Squash PostgreSQL
SELENIUM_HTTP_PORT 4444 Selenium Grid Hub
SELENIUM_VNC_PORT 7900 noVNC VNC viewer
FILEBROWSER_PORT 3007 Filebrowser
FORGEJO_HTTP_PORT 3009 Forgejo
SCRIPTS_UI_PORT 3008 Scripts UI
JMETER_UI_PORT 3005 JMeter UI
JMETER_PROMETHEUS_PORT 9270 JMeter Prometheus exporter
OPENSEARCH_HTTP_PORT 5601 OpenSearch Dashboards
OPENSEARCH_API_PORT 9201 OpenSearch REST API

Docker Desktop rule

No port in the 80xx range is used — Docker Desktop (Windows/macOS) reserves these ports for internal use and may generate conflicts. That's why Squash TM is on 9086 (not 8086) and the backend is on 9080 (not 8080).

HTTP session

Variable Type Default Role
SESSION_COOKIE_SECURE boolean false Secure flag on the session cookie — set to true over HTTPS
SESSION_COOKIE_SAME_SITE lax/strict/none lax Cookie SameSite policy
SESSION_SECRET string perfshop-dev-secret Secret key for Express sessions (scripts-ui) — change in production

Administration

Variable Default Role
ADMIN_EMAIL admin@perfshop.fr Email of the superadmin created at bootstrap
ADMIN_PASSWORD perfshop Superadmin password — see Admin authentication

The default password must be changed for any public exposure, either through this variable followed by a restart, or through the "My account" page of the instructor panel.

CORS

Variable Default Role
CORS_ALLOWED_ORIGINS http://localhost:9091,http://localhost:3001,http://localhost:3003,http://localhost:3004 Comma-separated list of origins allowed to call the backend APIs

To add the Vite dev server in development, add http://localhost:5173 to this list.

PerfShop database (MySQL)

Variable Default Role
DB_ROOT_PASSWORD rootpass123 root password of the MySQL container
DB_PASSWORD perfshop123 Password of the perfshop user
DB_PORT 19306 MySQL port exposed on the host — ⚠️ port 3306 reserved by Hyper-V/WSL2 on Windows

The database name (perfshop) and the user name (perfshop) are fixed in docker-compose.yml and in the backend application.yml.

Squash TM database (PostgreSQL)

Squash TM uses PostgreSQL (and not MySQL like the rest of PerfShop).

Variable Default Role
SQUASH_DB_PASSWORD squash123 PostgreSQL password for Squash
SQUASH_ADMIN_LOGIN admin Admin login for the Squash TM interface
SQUASH_ADMIN_PASSWORD admin Squash TM admin password
SQUASH_JWT_SECRET (long token) Signed JWT key for the Squash automation API
SQUASH_PUBLIC_URL http://localhost:9086/squash Public URL visible from the browser
SQUASH_ADMIN_EMAIL admin@perfshop.fr Seeded admin email
SQUASH_AUTOM_TOKEN (RS512 JWT token) RS512-signed JWT token used by Squash Orchestrator to authenticate to Squash TM

See Squash TM for stack details.

Grafana

Variable Default Role
GF_SECURITY_ADMIN_USER admin Grafana admin login
GF_SECURITY_ADMIN_PASSWORD perfshop Grafana admin password

These variables are prefixed GF_ because they are consumed directly by Grafana in its native env-based configuration format.

JMeter

Variable Default Role
JMETER_IMAGE justb4/jmeter:latest Docker image used to run JMeter plans
DOCKER_NETWORK perfshop_perfshop-network Docker network shared with dynamic JMeter containers
JMETER_MAX_RAM 512 Max RAM (in MB) allocated to each JMeter execution
JMETER_TARGET_INTERNAL http://perfshop-app:8080 Internal backend URL, used by default in plans
JMETER_TARGET_EXTERNAL ${PUBLIC_API_URL} External URL (for tests from outside the Docker network)
JMETER_TARGET_FRONTEND ${PUBLIC_FRONTEND_URL} Frontend URL for end-to-end tests
PERFSHOP_API_INTERNAL http://perfshop-app:8080 Alias of the internal backend URL, used by several components (monitoring, test-runner)

QA stack — test runner

Variable Default Role
RF_RUNNER_SELENIUM_URL http://perfshop-selenium:4444/wd/hub Selenium hub URL used by the Robot Framework runner
PERFSHOP_FRONTEND_INTERNAL http://perfshop-frontend Internal frontend URL for Robot/pytest tests

Forgejo — self-hosted Git

Variable Default Role
FORGEJO_DOMAIN localhost Domain declared in the Forgejo configuration
FORGEJO_ADMIN_USER forgejo-admin Admin account created at seed
FORGEJO_ADMIN_PASSWORD perfshop Forgejo admin password
FORGEJO_CI_USER perfshop-ci Account dedicated to continuous integration
FORGEJO_CI_PASSWORD perfshop CI account password
FORGEJO_CI_EMAIL ci@perfshop.fr CI account email
FORGEJO_REPO perfshop-tests Name of the repository seeded at startup

See Forgejo.

OpenSearch

Variable Default Role
OPENSEARCH_ADMIN_USER admin OpenSearch Dashboards admin login
OPENSEARCH_ADMIN_PASSWORD perfshop OpenSearch admin password
OPENSEARCH_JAVA_OPTS -Xms512m -Xmx512m OpenSearch JVM heap — 512m recommended in dev, 1g in prod

See OpenSearch and Vector.

PerfShop license

Variable Default Role
PERFSHOP_LICENSE_KEY (empty) PFSH-xxx.yyy license key preloaded at backend startup

Two license activation paths are possible — see License system:

  • Option A — inject into .env before startup:
    # Unix / macOS
    echo "PERFSHOP_LICENSE_KEY=PFSH-xxx.yyy" >> .env
    # Windows PowerShell
    Add-Content .env "PERFSHOP_LICENSE_KEY=PFSH-xxx.yyy"
    
  • Option B — activate from the UI (chaos-admin panel → license management → paste the key)

Without a license, the shop stays accessible, but protected interfaces respond with HTTP 402. See Freemium vs Pro.

Legacy registry — unused in local build

These two variables are present in .env.example for production deployment scenarios with an image registry. They are ignored in local build mode (docker-compose.build.yml) and can be left at their default values.

Variable Default Role
GITLAB_HOSTNAME perfshop-gitlab.tests-performance.fr Hostname of the legacy registry (placeholder)
GITLAB_REGISTRY_PORT 5050 Legacy registry port

Note

PerfShop does not use any external registry internally. These variables are kept for compatibility with older external deployments that used a private image registry. The official Git workflow goes through Forgejo — see Forgejo Git workflow.

Cross-references

The .env.example file itself is commented and groups variables by section with ASCII headers. It serves as the source of truth in case of divergence with this documentation. When in doubt, always refer to the content of the .env.example shipped with the source code version you are using.

See also