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:
parent
95899b7208
commit
4bd6ec2232
@ -82,7 +82,7 @@ export const AddVolumes = ({
|
||||
defaultValues: {
|
||||
type: serviceType === "compose" ? "file" : "bind",
|
||||
hostPath: "",
|
||||
mountPath: "",
|
||||
mountPath: serviceType === "compose" ? "/" : "",
|
||||
},
|
||||
resolver: zodResolver(mySchema),
|
||||
});
|
||||
@ -330,20 +330,22 @@ export const AddVolumes = ({
|
||||
/>
|
||||
</>
|
||||
)}
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="mountPath"
|
||||
render={({ field }) => (
|
||||
<FormItem>
|
||||
<FormLabel>Mount Path (In the container)</FormLabel>
|
||||
<FormControl>
|
||||
<Input placeholder="Mount Path" {...field} />
|
||||
</FormControl>
|
||||
{serviceType !== "compose" && (
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="mountPath"
|
||||
render={({ field }) => (
|
||||
<FormItem>
|
||||
<FormLabel>Mount Path (In the container)</FormLabel>
|
||||
<FormControl>
|
||||
<Input placeholder="Mount Path" {...field} />
|
||||
</FormControl>
|
||||
|
||||
<FormMessage />
|
||||
</FormItem>
|
||||
)}
|
||||
/>
|
||||
<FormMessage />
|
||||
</FormItem>
|
||||
)}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
@ -228,7 +228,7 @@ export const composeRouter = createTRPCRouter({
|
||||
for (const mount of mounts) {
|
||||
await createMount({
|
||||
filePath: mount.filePath,
|
||||
mountPath: mount.mountPath,
|
||||
mountPath: "",
|
||||
content: mount.content,
|
||||
serviceId: compose.composeId,
|
||||
serviceType: "compose",
|
||||
|
@ -21,7 +21,7 @@ export function generate(schema: Schema): Template {
|
||||
|
||||
const mounts: Template["mounts"] = [
|
||||
{
|
||||
mountPath: "./config.toml",
|
||||
filePath: "config.toml",
|
||||
content: `[app]
|
||||
address = "0.0.0.0:9000"
|
||||
|
||||
|
@ -23,8 +23,7 @@ export function generate(schema: Schema): Template {
|
||||
|
||||
const mounts: Template["mounts"] = [
|
||||
{
|
||||
filePath: "clickhouse-config.xml",
|
||||
mountPath: "./clickhouse/clickhouse-config.xml",
|
||||
filePath: "/clickhouse/clickhouse-config.xml",
|
||||
content: `
|
||||
<clickhouse>
|
||||
<logger>
|
||||
@ -46,8 +45,7 @@ export function generate(schema: Schema): Template {
|
||||
`,
|
||||
},
|
||||
{
|
||||
filePath: "clickhouse-user-config.xml",
|
||||
mountPath: "./clickhouse/clickhouse-user-config.xml",
|
||||
filePath: "/clickhouse/clickhouse-user-config.xml",
|
||||
content: `
|
||||
<clickhouse>
|
||||
<profiles>
|
||||
|
@ -14,7 +14,6 @@ export interface Template {
|
||||
envs: string[];
|
||||
mounts?: {
|
||||
filePath: string;
|
||||
mountPath: string;
|
||||
content?: string;
|
||||
}[];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user