Dockerize environment for automated testing

This commit is contained in:
geoffsee
2025-08-07 19:06:29 -04:00
parent 95d9ba8925
commit 63bea1315a
29 changed files with 9137 additions and 73 deletions

22
configure_masterkey.js Executable file
View File

@@ -0,0 +1,22 @@
#!/usr/bin/env node
// generate-zitadel-env.js
const fs = require('fs');
const { execSync } = require('child_process');
try {
// Generate a 32-byte hex string with openssl
const masterKey = execSync('openssl rand -hex 16').toString().trim().slice(0, 32);
// Prepare the env file content
const envContent = `ZITADEL_MASTERKEY=${masterKey}\n`;
// Save to zitadel.env
fs.writeFileSync('.zitadel.env', envContent, { encoding: 'utf8', flag: 'w' });
console.log('zitadel.env file created with a 32-byte hex ZITADEL_MASTERKEY');
} catch (err) {
console.error('Failed to generate ZITADEL_MASTERKEY:', err.message);
process.exit(1);
}