Skip to content

Commit a1c4397

Browse files
authored
Merge pull request #693 from librespeed/fix-docker-images
Fix docker images and dual mode
2 parents dd40a3a + e6fac55 commit a1c4397

File tree

6 files changed

+464
-4
lines changed

6 files changed

+464
-4
lines changed

Dockerfile.alpine

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ RUN apk add --quiet --no-cache \
44
apache2 \
55
php-apache2 \
66
php-ctype \
7+
php-phar \
78
php-gd \
89
php-openssl \
910
php-pdo \

docker/test/README.md

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
The files in this folder represent a simple end to end test.
2+
At the moment it is interactive, so you need to run `docker compose up` in the folder and watch the output for errors.
3+
Sometimes the mysql container needs more than 15 seconds, so the test_script fails.
4+
Just try it again.

docker/test/docker-compose.yml

+27
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
## this is a docker compose file used to test all scenarios
22
## do not use it in production
3+
x-shared:
4+
speedtest-service: &speedtest-service
5+
environment:
6+
- PASSWORD=gimmeTheStats1337
7+
8+
- ENABLE_ID_OBFUSCATION=true
9+
- MODE=standalone
10+
- REDACT_IP_ADDRESSES=true
11+
- TELEMETRY=true
312

413
services:
514
###################### POSTGRESQL ################################
@@ -104,9 +113,27 @@ services:
104113
ports:
105114
- 9128:8080
106115

116+
speedtest-alpine-sqlite-dual:
117+
<<: *speedtest-service
118+
build:
119+
context: ../..
120+
dockerfile: Dockerfile.alpine
121+
environment:
122+
- MODE=dual
123+
124+
volumes:
125+
- ./servers.json:/servers.json:ro
126+
ports:
127+
- 9129:8080
128+
107129
############## TEST CONTAINER ###############################################################
108130
test-container:
109131
image: alpine
132+
depends_on:
133+
- pg
134+
- mysql
135+
- speedtest-alpine-mysql
136+
- speedtest-alpine-pg
110137
volumes:
111138
- ./test-script.sh:/test-script.sh
112139
command:

0 commit comments

Comments
 (0)