Merge branch 'master' into fix-docker-images

This commit is contained in:
sstidl 2024-12-29 17:23:19 +01:00 committed by GitHub
commit de846743dc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 40 additions and 11 deletions

View file

@ -18,9 +18,13 @@ cp /speedtest/favicon.ico /var/www/html/
# Set custom webroot on alpine
if is_alpine; then
echo "ALPINE IMAGE"
sed -i "s#\"/var/www/localhost/htdocs\"#\"/var/www/html\"#g" /etc/apache2/httpd.conf
else
echo "DEBIAN IMAGE"
fi
# Set up backend side for standlone modes
if [[ "$MODE" == "standalone" || "$MODE" == "dual" ]]; then
cp -r /speedtest/backend/ /var/www/html/backend
@ -82,9 +86,9 @@ if [[ "$TELEMETRY" == "true" && ("$MODE" == "frontend" || "$MODE" == "standalone
mkdir -p /database/
if is_alpine; then
chown apache /database/
chown -R apache /database/
else
chown www-data /database/
chown -R www-data /database/
fi
fi

View file

@ -11,7 +11,7 @@ x-shared:
- TELEMETRY=true
services:
###################### POSTGRESQL ################################
###################### POSTGRESQL ################################
pg:
image: postgres:alpine
environment:
@ -48,7 +48,7 @@ services:
ports:
- 9124:8080
####################### MYSQL ##############################
####################### MYSQL ##############################
mysql:
image: mysql:lts
@ -88,7 +88,8 @@ services:
ports:
- 9126:8080
###### SQLITE ######
################ SQLITE ####################################
speedtest-debian-sqlite:
# check at http://localhost:9125/results/sanitycheck.php
build:
@ -111,6 +112,7 @@ services:
environment: *env_vars_sqlite
ports:
- 9128:8080
speedtest-alpine-sqlite-dual:
<<: *speedtest-service
build:
@ -123,3 +125,12 @@ services:
- ./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

View file

@ -0,0 +1,14 @@
PORT=8080
apk add w3m
echo sleeping a little to get things setteled...
sleep 10
for db in sqlite pg mysql; do
for distro in alpine debian; do
hostname=speedtest-$distro-$db
echo $hostname
w3m -dump http://$hostname:$PORT/results/sanitycheck.php|grep -v 'N/A'
done
done