mirror of
https://github.com/andwati/dokploy.git
synced 2026-11-26 13:48:46 +00:00
28 lines
445 B
TypeScript
28 lines
445 B
TypeScript
import type { Schema, Template } from "../utils";
|
|
|
|
export function generate(schema: Schema): Template {
|
|
const mounts: Template["mounts"] = [
|
|
{
|
|
filePath: "init-mongo.sh",
|
|
content: `
|
|
#!/bin/bash
|
|
mongo <<EOF
|
|
use unifi
|
|
db.createUser({
|
|
user: "unifi",
|
|
pwd: "unifi_password",
|
|
roles: [
|
|
{ db: "unifi", role: "dbOwner" },
|
|
{ db: "unifi_stat", role: "dbOwner" }
|
|
]
|
|
})
|
|
EOF
|
|
`,
|
|
},
|
|
];
|
|
|
|
return {
|
|
mounts,
|
|
};
|
|
}
|