docker test for postgres

This commit is contained in:
Stefan S 2024-10-26 15:52:33 +02:00
parent 0c31f1de6d
commit 2c3be7b52d
2 changed files with 41 additions and 0 deletions

1
docker/test/.env Normal file
View file

@ -0,0 +1 @@
COMPOSE_PROJECT_NAME=speedtest-test

View file

@ -0,0 +1,40 @@
## this is a docker compose file used to test all scenarios
## do not use it in production
services:
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
- PASSWORD=gimmeTheStats1337
- DB_HOSTNAME=pg
- DB_NAME=librespeed
- DB_PASSWORD=Not4SecureProduction
- DB_PORT=5432
- 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
ports:
- 9124:8080