mirror of
https://github.com/andwati/dokploy.git
synced 2026-11-04 19:22:16 +00:00
feat(docker): update generateConfigContainer to accept Partial<ApplicationNested> and enhance mount checks
This commit is contained in:
@@ -3,6 +3,7 @@ import type { CreateServiceOptions } from "dockerode";
|
|||||||
import {
|
import {
|
||||||
calculateResources,
|
calculateResources,
|
||||||
generateBindMounts,
|
generateBindMounts,
|
||||||
|
generateConfigContainer,
|
||||||
generateFileMounts,
|
generateFileMounts,
|
||||||
generateVolumeMounts,
|
generateVolumeMounts,
|
||||||
prepareEnvironmentVariables,
|
prepareEnvironmentVariables,
|
||||||
|
|||||||
@@ -348,7 +348,9 @@ export const calculateResources = ({
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
export const generateConfigContainer = (application: ApplicationNested) => {
|
export const generateConfigContainer = (
|
||||||
|
application: Partial<ApplicationNested>,
|
||||||
|
) => {
|
||||||
const {
|
const {
|
||||||
healthCheckSwarm,
|
healthCheckSwarm,
|
||||||
restartPolicySwarm,
|
restartPolicySwarm,
|
||||||
@@ -362,7 +364,7 @@ export const generateConfigContainer = (application: ApplicationNested) => {
|
|||||||
networkSwarm,
|
networkSwarm,
|
||||||
} = application;
|
} = application;
|
||||||
|
|
||||||
const haveMounts = mounts.length > 0;
|
const haveMounts = mounts && mounts.length > 0;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
...(healthCheckSwarm && {
|
...(healthCheckSwarm && {
|
||||||
|
|||||||
Reference in New Issue
Block a user