Registry testing - part 9

This commit is contained in:
Maurus Decimus
2026-03-19 19:29:17 +01:00
parent 7ae6654735
commit a67921f18c
57 changed files with 2886 additions and 1312 deletions

View File

@@ -0,0 +1,26 @@
#!/bin/bash
set -e
CERT_DIR=/certs
if [ ! -f "$CERT_DIR/cert.pem" ]; then
echo "Generating self-signed certificate..."
openssl req -x509 -newkey rsa:2048 -nodes \
-keyout "$CERT_DIR/key.pem" \
-out "$CERT_DIR/cert.pem" \
-days 365 \
-subj "/CN=localhost/O=Stalwart Test/C=US" \
-addext "subjectAltName=DNS:localhost,DNS:keycloak,DNS:openldap,DNS:pebble,DNS:*.stalwart.test,IP:127.0.0.1"
# Create combined PEM for services that need it
cat "$CERT_DIR/cert.pem" "$CERT_DIR/key.pem" > "$CERT_DIR/combined.pem"
# Create PKCS12 for Keycloak
openssl pkcs12 -export -in "$CERT_DIR/cert.pem" -inkey "$CERT_DIR/key.pem" \
-out "$CERT_DIR/keystore.p12" -name localhost -password pass:changeit
chmod 644 "$CERT_DIR"/*
echo "Certificates generated."
else
echo "Certificates already exist."
fi

View File

@@ -0,0 +1,7 @@
#!/bin/bash
set -e
fdbcli --exec "configure new single memory"
echo "FoundationDB configured."
exit 0

View File

@@ -0,0 +1,12 @@
#!/bin/bash
set -e
# Wait for MinIO to be ready
echo "Waiting for MinIO..."
until mc alias set local http://minio:9000 minioadmin minioadmin 2>/dev/null; do
sleep 1
done
# Create the stalwart bucket
mc mb local/stalwart --ignore-existing
echo "MinIO bucket 'stalwart' created."