mirror of
https://github.com/librespeed/speedtest.git
synced 2026-05-13 16:26:38 +00:00
* Implement fromScratch design * Add some documentation * enable new design in docker (no alpine yet) * merge fixed docker images * alpine docker added new design * fix #685 * Implement fromScratch design * Add some documentation * enable new design in docker (no alpine yet) * alpine docker added new design * fix #685 * fix database permissions alpine, remove baby * hide serverselector on only one server * Update frontend/styling/server-selector.css Co-authored-by: qodo-merge-pro-for-open-source[bot] <189517486+qodo-merge-pro-for-open-source[bot]@users.noreply.github.com> * fix alpine image again * adjust settings.json in entrypoint so env vars are honored * Update frontend/javascript/index.js Co-authored-by: qodo-merge-for-open-source[bot] <189517486+qodo-merge-for-open-source[bot]@users.noreply.github.com> * Add feature switch for new design via config file, URL parameters, and Docker (#742) * Initial plan * Add feature switch for new design with config and URL parameter support Co-authored-by: sstidl <12804296+sstidl@users.noreply.github.com> * Improve error handling and prevent infinite redirect loops Co-authored-by: sstidl <12804296+sstidl@users.noreply.github.com> * Update Dockerfiles and entrypoint to support design feature switch Co-authored-by: sstidl <12804296+sstidl@users.noreply.github.com> * Update design-switch.js Co-authored-by: qodo-free-for-open-source-projects[bot] <189517486+qodo-free-for-open-source-projects[bot]@users.noreply.github.com> * fix: copy actions in entrypoint * Restructure design switch to place both designs at root level Co-authored-by: sstidl <12804296+sstidl@users.noreply.github.com> * Flatten frontend assets in Docker to eliminate frontend directory Co-authored-by: sstidl <12804296+sstidl@users.noreply.github.com> * fix: entrypoint settings & server-list disable entrypoint bash debug * add link to modern design --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: sstidl <12804296+sstidl@users.noreply.github.com> Co-authored-by: sstidl <sstidl@users.noreply.github.com> Co-authored-by: qodo-free-for-open-source-projects[bot] <189517486+qodo-free-for-open-source-projects[bot]@users.noreply.github.com> * add armv7 * reformat * Add GDPR_EMAIL environment variable for Docker deployments (#743) * Initial plan * Add GDPR_EMAIL environment variable for Docker deployments Co-authored-by: sstidl <12804296+sstidl@users.noreply.github.com> * Improve GDPR_EMAIL handling with proper escaping and loop Co-authored-by: sstidl <12804296+sstidl@users.noreply.github.com> * Refine GDPR_EMAIL processing - skip index.html and improve escaping Co-authored-by: sstidl <12804296+sstidl@users.noreply.github.com> * Optimize GDPR_EMAIL sed commands and improve escaping Co-authored-by: sstidl <12804296+sstidl@users.noreply.github.com> * Clarify sed escaping comment for GDPR_EMAIL Co-authored-by: sstidl <12804296+sstidl@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: sstidl <12804296+sstidl@users.noreply.github.com> * cleanup old EMAIL ENV Var * fix: line break in html prevented sed replacement * version 6.0.0pre1 * test: add mssql docker compose tests * Update Speedtest screen recording link in README * Filter unreachable servers from selector (newdesign UI) (#769) * Filter unreachable servers from selector (newdesign UI) * Apply suggestions from code review Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * keep // servers in list Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * fix misleading comment --------- Co-authored-by: Lumi <lumi@openclaw.local> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Co-authored-by: Stefan Stidl <sti-github@stidl.com> * fix: server.json handling * Use server-list.json in classic frontend by default * Add configurable server list URLs to frontend and Docker --------- Co-authored-by: Timendus <mail@timendus.com> Co-authored-by: Stefan Stidl <stefan.stidl@ffg.at> Co-authored-by: qodo-merge-pro-for-open-source[bot] <189517486+qodo-merge-pro-for-open-source[bot]@users.noreply.github.com> Co-authored-by: qodo-merge-for-open-source[bot] <189517486+qodo-merge-for-open-source[bot]@users.noreply.github.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: sstidl <12804296+sstidl@users.noreply.github.com> Co-authored-by: qodo-free-for-open-source-projects[bot] <189517486+qodo-free-for-open-source-projects[bot]@users.noreply.github.com> Co-authored-by: Stefan Stidl <sti-github@stidl.com> Co-authored-by: Lumi <lumi@openclaw.local> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
208 lines
5.5 KiB
YAML
208 lines
5.5 KiB
YAML
## this is a docker compose file used to test all scenarios
|
|
## do not use it in production
|
|
x-shared:
|
|
speedtest-service: &speedtest-service
|
|
environment:
|
|
- PASSWORD=gimmeTheStats1337
|
|
- GDPR_EMAIL=test@example.com
|
|
- ENABLE_ID_OBFUSCATION=true
|
|
- MODE=standalone
|
|
- REDACT_IP_ADDRESSES=true
|
|
- TELEMETRY=true
|
|
|
|
services:
|
|
###################### POSTGRESQL ################################
|
|
pg:
|
|
image: postgres:alpine
|
|
environment:
|
|
POSTGRES_PASSWORD: Not4SecureProduction
|
|
POSTGRES_USER: librespeed
|
|
volumes:
|
|
# mount init script from source to create database tables
|
|
- ../../results/telemetry_postgresql.sql:/docker-entrypoint-initdb.d/01-init.sql
|
|
|
|
speedtest-debian-pg:
|
|
build:
|
|
context: ../..
|
|
dockerfile: Dockerfile
|
|
environment: &env_vars_pg
|
|
- PASSWORD=gimmeTheStats1337
|
|
- DB_HOSTNAME=pg
|
|
- DB_NAME=librespeed
|
|
- DB_PASSWORD=Not4SecureProduction
|
|
- DB_TYPE=postgresql
|
|
- DB_USERNAME=librespeed
|
|
- GDPR_EMAIL=test@example.com
|
|
- ENABLE_ID_OBFUSCATION=true
|
|
- MODE=standalone
|
|
- REDACT_IP_ADDRESSES=true
|
|
- TELEMETRY=true
|
|
ports:
|
|
- 9123:8080
|
|
|
|
speedtest-alpine-pg:
|
|
build:
|
|
context: ../..
|
|
dockerfile: Dockerfile.alpine
|
|
environment: *env_vars_pg
|
|
ports:
|
|
- 9124:8080
|
|
|
|
####################### MYSQL ##############################
|
|
|
|
mysql:
|
|
image: mysql:lts
|
|
environment:
|
|
MYSQL_ROOT_PASSWORD: Not4SecureProduction
|
|
MYSQL_USER: librespeed
|
|
MYSQL_PASSWORD: Not4SecureProduction
|
|
MYSQL_DATABASE: librespeed
|
|
volumes:
|
|
# mount init script from source to create database tables
|
|
- ../../results/telemetry_mysql.sql:/docker-entrypoint-initdb.d/01-init.sql
|
|
|
|
speedtest-debian-mysql:
|
|
# check at http://localhost:9125/results/sanitycheck.php
|
|
build:
|
|
context: ../..
|
|
dockerfile: Dockerfile
|
|
environment: &env_vars_mysql
|
|
- PASSWORD=gimmeTheStats1337
|
|
- DB_HOSTNAME=mysql
|
|
- DB_NAME=librespeed
|
|
- DB_PASSWORD=Not4SecureProduction
|
|
- DB_TYPE=mysql
|
|
- DB_USERNAME=librespeed
|
|
- GDPR_EMAIL=test@example.com
|
|
- ENABLE_ID_OBFUSCATION=true
|
|
- MODE=standalone
|
|
- REDACT_IP_ADDRESSES=true
|
|
- TELEMETRY=true
|
|
ports:
|
|
- 9125:8080
|
|
speedtest-alpine-mysql:
|
|
build:
|
|
context: ../..
|
|
dockerfile: Dockerfile.alpine
|
|
environment: *env_vars_mysql
|
|
ports:
|
|
- 9126:8080
|
|
|
|
####################### MSSQL ##############################
|
|
|
|
mssql:
|
|
image: mcr.microsoft.com/mssql/server:2022-latest
|
|
environment:
|
|
- ACCEPT_EULA=Y
|
|
- SA_PASSWORD=Not4SecureProduction1337
|
|
- MSSQL_PID=Express
|
|
healthcheck:
|
|
test:
|
|
["CMD-SHELL", "/opt/mssql-tools18/bin/sqlcmd -S localhost -U sa -P $$SA_PASSWORD -C -Q 'SELECT 1' || exit 1"]
|
|
interval: 10s
|
|
retries: 5
|
|
start_period: 30s
|
|
|
|
mssql-init:
|
|
image: mcr.microsoft.com/mssql/server:2022-latest
|
|
depends_on:
|
|
mssql:
|
|
condition: service_healthy
|
|
environment:
|
|
- SA_PASSWORD=Not4SecureProduction1337
|
|
volumes:
|
|
- ../../results/telemetry_mssql.sql:/docker-entrypoint-initdb.d/01-init.sql:ro
|
|
command: >
|
|
bash -c '
|
|
echo "Waiting for MSSQL to be ready...";
|
|
until /opt/mssql-tools18/bin/sqlcmd -S mssql -U sa -P "$$SA_PASSWORD" -C -Q "SELECT 1"; do
|
|
sleep 1;
|
|
done;
|
|
echo "Running init scripts...";
|
|
for f in /docker-entrypoint-initdb.d/*.sql; do
|
|
echo "Executing $$f...";
|
|
/opt/mssql-tools18/bin/sqlcmd -S mssql -U sa -P "$$SA_PASSWORD" -C -i "$$f";
|
|
done;
|
|
echo "Initialization complete!";
|
|
'
|
|
|
|
speedtest-debian-mssql:
|
|
build:
|
|
context: ../..
|
|
dockerfile: Dockerfile
|
|
environment: &env_vars_mssql
|
|
- PASSWORD=gimmeTheStats1337
|
|
- DB_HOSTNAME=mssql
|
|
- DB_NAME=librespeed
|
|
- DB_PASSWORD=Not4SecureProduction1337
|
|
- DB_TYPE=mssql
|
|
- DB_USERNAME=sa
|
|
- GDPR_EMAIL=test@example.com
|
|
- ENABLE_ID_OBFUSCATION=true
|
|
- MODE=standalone
|
|
- REDACT_IP_ADDRESSES=true
|
|
- TELEMETRY=true
|
|
ports:
|
|
- 9130:8080
|
|
|
|
speedtest-alpine-mssql:
|
|
build:
|
|
context: ../..
|
|
dockerfile: Dockerfile.alpine
|
|
environment: *env_vars_mssql
|
|
ports:
|
|
- 9131:8080
|
|
|
|
################ SQLITE ####################################
|
|
|
|
speedtest-debian-sqlite:
|
|
# check at http://localhost:9125/results/sanitycheck.php
|
|
build:
|
|
context: ../..
|
|
dockerfile: Dockerfile
|
|
environment: &env_vars_sqlite
|
|
- PASSWORD=gimmeTheStats1337
|
|
- GDPR_EMAIL=test@example.com
|
|
- ENABLE_ID_OBFUSCATION=true
|
|
- MODE=standalone
|
|
- REDACT_IP_ADDRESSES=true
|
|
- TELEMETRY=true
|
|
ports:
|
|
- 9127:8080
|
|
|
|
speedtest-alpine-sqlite:
|
|
build:
|
|
context: ../..
|
|
dockerfile: Dockerfile.alpine
|
|
environment: *env_vars_sqlite
|
|
ports:
|
|
- 9128:8080
|
|
|
|
speedtest-alpine-sqlite-dual:
|
|
<<: *speedtest-service
|
|
build:
|
|
context: ../..
|
|
dockerfile: Dockerfile.alpine
|
|
environment:
|
|
- MODE=dual
|
|
|
|
volumes:
|
|
- ./servers.json:/servers.json:ro
|
|
ports:
|
|
- 9129:8080
|
|
|
|
############## TEST CONTAINER ###############################################################
|
|
test-container:
|
|
image: alpine
|
|
depends_on:
|
|
- pg
|
|
- mysql
|
|
- mssql-init
|
|
- speedtest-alpine-mysql
|
|
- speedtest-alpine-pg
|
|
- speedtest-alpine-mssql
|
|
volumes:
|
|
- ./test-script.sh:/test-script.sh
|
|
command:
|
|
- sh
|
|
- /test-script.sh
|