An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.
PHP coolifydatabasesdeploymentdockerdocker-composeinertiajslaravelmariadbmysqlnextjsnodejsphppostgresredisself-hostedself-hostingserverstatic-sitesveltesvelte5
fix: Seeding
Andras Bacsai928d53e532f2
diff --git a/apps/api/prisma/seed.js b/apps/api/prisma/seed.jsindex 0113596827..78a625e17e 100644--- a/apps/api/prisma/seed.js+++ b/apps/api/prisma/seed.js@@ -23,7 +23,8 @@ async function main() {await prisma.setting.create({data: {isRegistrationEnabled: true,- isTraefikUsed: true,+ proxyPassword: encrypt(generatePassword()),+ proxyUser: cuid()}});} else {@@ -72,4 +73,16 @@ main()}).finally(async () => {await prisma.$disconnect();- });\ No newline at end of file+ });++const encrypt = (text) => {+ if (text) {+ const iv = crypto.randomBytes(16);+ const cipher = crypto.createCipheriv(algorithm, process.env['COOLIFY_SECRET_KEY'], iv);+ const encrypted = Buffer.concat([cipher.update(text), cipher.final()]);+ return JSON.stringify({+ iv: iv.toString('hex'),+ content: encrypted.toString('hex')+ });+ }+};\ No newline at end of file