devops folders consolidate

This commit is contained in:
master
2026-01-25 23:27:41 +02:00
parent 6e687b523a
commit a50bbb38ef
334 changed files with 35079 additions and 5569 deletions

View File

@@ -1,5 +1,5 @@
#!/usr/bin/env bash
# Runs live TTL validation for Attestor dedupe stores against local MongoDB/Valkey.
# Runs live TTL validation for Attestor dedupe stores against local PostgreSQL/Valkey.
set -euo pipefail
@@ -30,17 +30,21 @@ trap cleanup EXIT
cat >"$compose_file" <<'YAML'
services:
mongo:
image: mongo:7.0
postgres:
image: postgres:18.1-alpine
environment:
POSTGRES_USER: attestor
POSTGRES_PASSWORD: attestor
POSTGRES_DB: attestor_ttl
ports:
- "27017:27017"
- "5432:5432"
healthcheck:
test: ["CMD", "mongosh", "--quiet", "localhost/test", "--eval", "db.runCommand({ ping: 1 })"]
test: ["CMD-SHELL", "pg_isready -U attestor -d attestor_ttl"]
interval: 5s
timeout: 3s
retries: 20
valkey:
image: valkey/valkey:8-alpine
image: valkey/valkey:9-alpine
command: ["valkey-server", "--save", "", "--appendonly", "no"]
ports:
- "6379:6379"
@@ -51,7 +55,7 @@ services:
retries: 20
YAML
echo "Starting MongoDB and Valkey containers..."
echo "Starting PostgreSQL and Valkey containers..."
$compose_cmd -f "$compose_file" up -d
wait_for_port() {
@@ -69,10 +73,10 @@ wait_for_port() {
return 1
}
wait_for_port 127.0.0.1 27017 "MongoDB"
wait_for_port 127.0.0.1 5432 "PostgreSQL"
wait_for_port 127.0.0.1 6379 "Valkey"
export ATTESTOR_LIVE_MONGO_URI="${ATTESTOR_LIVE_MONGO_URI:-mongodb://127.0.0.1:27017}"
export ATTESTOR_LIVE_POSTGRES_URI="${ATTESTOR_LIVE_POSTGRES_URI:-Host=127.0.0.1;Port=5432;Database=attestor_ttl;Username=attestor;Password=attestor}"
export ATTESTOR_LIVE_VALKEY_URI="${ATTESTOR_LIVE_VALKEY_URI:-127.0.0.1:6379}"
echo "Running live TTL validation tests..."