Merge pull request #314 from Dokploy/fix/add-file-path

fix(template): add missing file path
This commit is contained in:
Mauricio Siu
2024-08-03 15:05:31 -06:00
committed by GitHub
4 changed files with 6 additions and 5 deletions

View File

@@ -227,7 +227,8 @@ export const composeRouter = createTRPCRouter({
if (mounts && mounts?.length > 0) { if (mounts && mounts?.length > 0) {
for (const mount of mounts) { for (const mount of mounts) {
await createMount({ await createMount({
mountPath: mount.mountPath, filePath: mount.filePath,
mountPath: "",
content: mount.content, content: mount.content,
serviceId: compose.composeId, serviceId: compose.composeId,
serviceType: "compose", serviceType: "compose",

View File

@@ -21,7 +21,7 @@ export function generate(schema: Schema): Template {
const mounts: Template["mounts"] = [ const mounts: Template["mounts"] = [
{ {
mountPath: "./config.toml", filePath: "config.toml",
content: `[app] content: `[app]
address = "0.0.0.0:9000" address = "0.0.0.0:9000"

View File

@@ -23,7 +23,7 @@ export function generate(schema: Schema): Template {
const mounts: Template["mounts"] = [ const mounts: Template["mounts"] = [
{ {
mountPath: "./clickhouse/clickhouse-config.xml", filePath: "/clickhouse/clickhouse-config.xml",
content: ` content: `
<clickhouse> <clickhouse>
<logger> <logger>
@@ -45,7 +45,7 @@ export function generate(schema: Schema): Template {
`, `,
}, },
{ {
mountPath: "./clickhouse/clickhouse-user-config.xml", filePath: "/clickhouse/clickhouse-user-config.xml",
content: ` content: `
<clickhouse> <clickhouse>
<profiles> <profiles>

View File

@@ -13,7 +13,7 @@ export interface Schema {
export interface Template { export interface Template {
envs: string[]; envs: string[];
mounts?: { mounts?: {
mountPath: string; filePath: string;
content?: string; content?: string;
}[]; }[];
} }