mirror of
https://github.com/Dokploy/templates
synced 2025-06-26 18:16:07 +00:00
feat: migrate templates
This commit is contained in:
@@ -1,27 +0,0 @@
|
||||
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,
|
||||
};
|
||||
}
|
||||
22
blueprints/unifi/template.yml
Normal file
22
blueprints/unifi/template.yml
Normal file
@@ -0,0 +1,22 @@
|
||||
variables: {}
|
||||
|
||||
config:
|
||||
domains: []
|
||||
|
||||
env: {}
|
||||
|
||||
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
|
||||
Reference in New Issue
Block a user