mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
fix(templates): use filePath instead of mountPath
This commit is contained in:
@@ -82,7 +82,7 @@ export const AddVolumes = ({
|
|||||||
defaultValues: {
|
defaultValues: {
|
||||||
type: serviceType === "compose" ? "file" : "bind",
|
type: serviceType === "compose" ? "file" : "bind",
|
||||||
hostPath: "",
|
hostPath: "",
|
||||||
mountPath: "",
|
mountPath: serviceType === "compose" ? "/" : "",
|
||||||
},
|
},
|
||||||
resolver: zodResolver(mySchema),
|
resolver: zodResolver(mySchema),
|
||||||
});
|
});
|
||||||
@@ -330,20 +330,22 @@ export const AddVolumes = ({
|
|||||||
/>
|
/>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
<FormField
|
{serviceType !== "compose" && (
|
||||||
control={form.control}
|
<FormField
|
||||||
name="mountPath"
|
control={form.control}
|
||||||
render={({ field }) => (
|
name="mountPath"
|
||||||
<FormItem>
|
render={({ field }) => (
|
||||||
<FormLabel>Mount Path (In the container)</FormLabel>
|
<FormItem>
|
||||||
<FormControl>
|
<FormLabel>Mount Path (In the container)</FormLabel>
|
||||||
<Input placeholder="Mount Path" {...field} />
|
<FormControl>
|
||||||
</FormControl>
|
<Input placeholder="Mount Path" {...field} />
|
||||||
|
</FormControl>
|
||||||
|
|
||||||
<FormMessage />
|
<FormMessage />
|
||||||
</FormItem>
|
</FormItem>
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
@@ -228,7 +228,7 @@ export const composeRouter = createTRPCRouter({
|
|||||||
for (const mount of mounts) {
|
for (const mount of mounts) {
|
||||||
await createMount({
|
await createMount({
|
||||||
filePath: mount.filePath,
|
filePath: mount.filePath,
|
||||||
mountPath: mount.mountPath,
|
mountPath: "",
|
||||||
content: mount.content,
|
content: mount.content,
|
||||||
serviceId: compose.composeId,
|
serviceId: compose.composeId,
|
||||||
serviceType: "compose",
|
serviceType: "compose",
|
||||||
|
|||||||
@@ -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"
|
||||||
|
|
||||||
|
|||||||
@@ -23,8 +23,7 @@ export function generate(schema: Schema): Template {
|
|||||||
|
|
||||||
const mounts: Template["mounts"] = [
|
const mounts: Template["mounts"] = [
|
||||||
{
|
{
|
||||||
filePath: "clickhouse-config.xml",
|
filePath: "/clickhouse/clickhouse-config.xml",
|
||||||
mountPath: "./clickhouse/clickhouse-config.xml",
|
|
||||||
content: `
|
content: `
|
||||||
<clickhouse>
|
<clickhouse>
|
||||||
<logger>
|
<logger>
|
||||||
@@ -46,8 +45,7 @@ export function generate(schema: Schema): Template {
|
|||||||
`,
|
`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
filePath: "clickhouse-user-config.xml",
|
filePath: "/clickhouse/clickhouse-user-config.xml",
|
||||||
mountPath: "./clickhouse/clickhouse-user-config.xml",
|
|
||||||
content: `
|
content: `
|
||||||
<clickhouse>
|
<clickhouse>
|
||||||
<profiles>
|
<profiles>
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ export interface Template {
|
|||||||
envs: string[];
|
envs: string[];
|
||||||
mounts?: {
|
mounts?: {
|
||||||
filePath: string;
|
filePath: string;
|
||||||
mountPath: string;
|
|
||||||
content?: string;
|
content?: string;
|
||||||
}[];
|
}[];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user