Selaa lähdekoodia

docker test for postgres

Stefan S 1 vuosi sitten
vanhempi
sitoutus
2c3be7b52d
2 muutettua tiedostoa jossa 41 lisäystä ja 0 poistoa
  1. 1 0
      docker/test/.env
  2. 40 0
      docker/test/docker-compose.yml

+ 1 - 0
docker/test/.env

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

+ 40 - 0
docker/test/docker-compose.yml

@@ -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 protected]
+      - 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