Skip to content

Welcome page

The welcome page is the visual entry point of the PerfShop stack. Displayed at container startup on its own port, it lists the exposed services with their URLs and any credentials. It is a pedagogical landing for students and instructors arriving on a freshly deployed environment.

Sources

welcome/index.html, welcome/welcome.js, welcome/welcome.css, welcome/entrypoint.sh, welcome/nginx.conf, welcome/Dockerfile, welcome/i18n/{fr,en}.json

Architecture

The perfshop-welcome container is a minimalist static Nginx image:

welcome/
├── Dockerfile        ← nginx:1.27-alpine + copies + ENTRYPOINT
├── entrypoint.sh     ← URL and i18n injection at startup
├── nginx.conf        ← static server port 3011
├── index.html        ← page structure
├── welcome.css       ← styles
├── welcome.js        ← service table construction
└── i18n/
    ├── fr.json
    └── en.json

At startup, entrypoint.sh replaces markers in index.html and welcome.js with the values of the environment variables (HOST_IP, PUBLIC_*_URL), then loads the i18n dictionary from i18n/<lang>.json and injects it as window.__I18N__ = {...} at the top of welcome.js.

This model allows building a single image and deploying it to several targets without rebuilding.

Port

The service listens on port 3011 (declared in nginx.conf and exposed by the Dockerfile). This port is dedicated to the welcome page and serves nothing else.

The modes: auto, ip and dns

The WELCOME_MODE variable controls the URL construction strategy:

Mode When to use it Behavior
auto (default) Every target, nothing to set dns as soon as one given PUBLIC_*_URL variable is not on the host (http://${HOST_IP}:<port>, a path allowed) — your domains, with prod; ip otherwise — what build.sh writes for desktop and unix, and the stack without .env. The container log tells the chosen mode and names the variable that decided, never its value ([welcome] WELCOME_MODE automatique : mode dns (PUBLIC_…_URL n'est pas sur l'hôte))
ip Docker Desktop, VPS, local Unix All URLs are built from HOST_IP and the published port of each service, read from the same variable as the compose file, with the same default (e.g., http://${HOST_IP}:${FRONTEND_HTTP_PORT:-8090})
dns NAS / production with domains Each URL is injected individually from the PUBLIC_*_URL variables (e.g., https://perfshop-frontend.perfshop.io)

IP mode

In ip mode, entrypoint.sh performs a series of sed -i calls that replace the __URL_FRONTEND__, __URL_API__, __URL_GRAFANA__, etc. markers with dynamically built URLs:

sed -i \
  -e "s|__HOST_IP__|${HOST_IP}|g" \
  -e "s|__URL_FRONTEND__|http://${HOST_IP}:${FRONTEND_HTTP_PORT:-8090}|g" \
  -e "s|__URL_API__|http://${HOST_IP}:${BACKEND_HTTP_PORT:-9080}|g" \
  ...

Classroom students use this mode: a single HOST_IP (the network address of the instructor's machine — never localhost: build.sh refuses it, and each student connects from their own machine) is enough to generate all URLs.

DNS mode

In dns mode, each URL must be provided individually via a dedicated environment variable. The script reads:

  • PUBLIC_FRONTEND_URL
  • PUBLIC_API_URL
  • PUBLIC_MONITORING_URL
  • PUBLIC_GRAFANA_URL
  • PUBLIC_PROMETHEUS_URL
  • PUBLIC_PYROSCOPE_URL
  • PUBLIC_CHAOS_URL
  • PUBLIC_ADMIN_URL
  • PUBLIC_DOCS_URL
  • PUBLIC_SQUASH_URL
  • PUBLIC_SELENIUM_VNC_URL
  • PUBLIC_FORGEJO_URL
  • PUBLIC_SCRIPTS_URL
  • PUBLIC_JMETER_URL
  • PUBLIC_TEST_AI_URL
  • PUBLIC_OPENSEARCH_URL

A missing or empty variable: the service is not listed — its row does not appear, and the container log names it ([welcome] Mode DNS — sans adresse publique, non annoncés : PUBLIC_…). Never localhost: the student's browser would resolve it to their own machine. To list a service, publish it behind the reverse proxy and set its variable in .env.

This is the mode used in production on a NAS with an HTTPS reverse proxy and dedicated subdomains for each service.

Internationalization

The PERFSHOP_LANG variable controls the language. entrypoint.sh reads /usr/share/nginx/html/i18n/<lang>.json; if the file does not exist, it logs a warning and falls back to fr. The JSON content is injected as window.__I18N__ = {...} at the top of welcome.js:

printf '// i18n — injected by entrypoint.sh\nwindow.__I18N__ = %s;\n\n' "${I18N_JSON}" > "${TMPFILE}"
cat "${WEBROOT}/welcome.js" >> "${TMPFILE}"
mv "${TMPFILE}" "${WEBROOT}/welcome.js"

The __lang__ key is added to the JSON before injection so that the JS knows which language is active. The final chmod 644 ensures that nginx can read the file generated at runtime (otherwise mktemp creates in 600, root-only → nginx worker returns 403).

The lang attribute of the <html> tag is also injected via sed on the __LANG__ marker in index.html.

Page structure

A simple banner with the PerfShop logo (⚡ lightning + title), a localized tagline ("Pedagogical Chaos Engineering Platform") and a green "Stack deployed" badge that visually indicates that all expected services are responding.

Hero

A central section containing:

  • A catchy title ("Welcome to PerfShop!")
  • A subtitle ("Your complete environment for performance testing, chaos engineering and QA is ready.")
  • A gray pill indicating the server IP (🖥️ Server: <HOST_IP>)

Service table

The heart of the page: an HTML table dynamically filled by welcome.js from window.__I18N__ and the URLs injected by entrypoint.sh. Each row follows the same format:

Service URL Description Account(s)
Frontend shop Clickable link PerfShop e-commerce storefront, chaos target —
Spring Boot API Clickable link Backend + /actuator/prometheus —
HTML monitoring Clickable link Real-time container + JVM dashboard —
Prometheus Clickable link Raw metrics of the platform and PromQL queries —
Pyroscope Clickable link CPU and memory profiles of the backend (flame graphs) —
Grafana Clickable link Observability: delivered dashboards admin / perfshop
Chaos Admin Clickable link Instructor panel + student page admin@perfshop.fr / perfshop
Documentation Clickable link MkDocs — this doc itself —
Squash TM Clickable link Test case management admin / admin
Selenium VNC Clickable link VNC view of Selenium browsers —
Forgejo Clickable link Self-hosted Git forgejo-admin / perfshop
Scripts UI Clickable link Web editor for Robot / pytest scripts admin@perfshop.fr / perfshop
JMeter UI Clickable link JMeter test launcher admin@perfshop.fr / perfshop
OpenSearch Clickable link Dashboards / log sink admin / perfshop

Labels and descriptions are translated from the i18n dictionary. The "Account(s)" column displays the deployment's default credentials — this is intentionally explicit for an isolated pedagogical environment; these values must be changed for any public exposure.

Some ancillary project services are not listed in this documentation. The page can also list other entries added by the local deployment — it simply displays what welcome.js feeds it from the available environment variables.

A minimalist footer with the license mention (AGPL-3.0), the link to perfshop.io and the author contact.

Environment variables consumed

Variable Mode Default
WELCOME_MODE All auto (ip or dns from the PUBLIC_*_URL, see above)
HOST_IP ip localhost
SELENIUM_VNC_BIND ip 0.0.0.0 in the example file, 127.0.0.1 when the key is missing — the link to the Selenium desktop follows its listening address: HOST_IP when it is open to the network (0.0.0.0), localhost when it is kept on the machine only
PERFSHOP_LANG Both fr
PUBLIC_FRONTEND_URL dns empty: service not listed
PUBLIC_API_URL dns empty: service not listed
PUBLIC_MONITORING_URL dns empty: service not listed
PUBLIC_GRAFANA_URL dns empty: service not listed
PUBLIC_PROMETHEUS_URL dns empty: service not listed
PUBLIC_PYROSCOPE_URL dns empty: service not listed
PUBLIC_CHAOS_URL dns empty: service not listed
PUBLIC_ADMIN_URL dns empty: service not listed
PUBLIC_DOCS_URL dns empty: service not listed
PUBLIC_SQUASH_URL dns empty: service not listed — the address carries the /squash/ path (Squash TM serves nothing else; .env.example: http://localhost:9086/squash/)
PUBLIC_SELENIUM_VNC_URL dns empty: service not listed
PUBLIC_FORGEJO_URL dns empty: service not listed
PUBLIC_SCRIPTS_URL dns empty: service not listed
PUBLIC_JMETER_URL dns empty: service not listed
PUBLIC_TEST_AI_URL dns empty: service not listed
PUBLIC_OPENSEARCH_URL dns empty: service not listed

See the environment variables reference for the full details.