mirror of
https://github.com/Dokploy/dokploy.git
synced 2026-06-26 17:45:49 +02:00
feat: add support for command arguments in application and database schemas
- Updated the application, mariadb, mongo, mysql, postgres, and redis schemas to include an optional `args` field for command arguments. - Enhanced the AddCommand and ShowCustomCommand components to handle multiple arguments using a dynamic form. - Modified the database build functions to incorporate the new `args` parameter when creating containers. - Added SQL migrations to update the database schema for existing applications and services to accommodate the new `args` field.
This commit is contained in:
@@ -28,6 +28,7 @@ export const buildPostgres = async (postgres: PostgresNested) => {
|
||||
databaseUser,
|
||||
databasePassword,
|
||||
command,
|
||||
args,
|
||||
mounts,
|
||||
} = postgres;
|
||||
|
||||
@@ -74,12 +75,14 @@ export const buildPostgres = async (postgres: PostgresNested) => {
|
||||
Mounts: [...volumesMount, ...bindsMount, ...filesMount],
|
||||
...(StopGracePeriod !== null &&
|
||||
StopGracePeriod !== undefined && { StopGracePeriod }),
|
||||
...(command
|
||||
? {
|
||||
Command: ["/bin/sh"],
|
||||
Args: ["-c", command],
|
||||
}
|
||||
: {}),
|
||||
...(command && {
|
||||
Command: command.split(" "),
|
||||
}),
|
||||
...(args &&
|
||||
args.length > 0 && {
|
||||
Args: args,
|
||||
}),
|
||||
|
||||
Labels,
|
||||
},
|
||||
Networks,
|
||||
|
||||
Reference in New Issue
Block a user