mirror of
https://github.com/librespeed/speedtest.git
synced 2026-07-10 02:32:06 +00:00
136 lines
3.5 KiB
YAML
136 lines
3.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
|
|
- 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
|
|
- 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
|
|
- 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
|
|
|
|
################ SQLITE ####################################
|
|
|
|
speedtest-debian-sqlite:
|
|
# check at http://localhost:9125/results/sanitycheck.php
|
|
build:
|
|
context: ../..
|
|
dockerfile: Dockerfile
|
|
environment: &env_vars_sqlite
|
|
- PASSWORD=gimmeTheStats1337
|
|
- 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
|
|
volumes:
|
|
- ./test-script.sh:/test-script.sh
|
|
command:
|
|
- sh
|
|
- /test-script.sh
|