mirror of
https://github.com/Dokploy/cli.git
synced 2026-06-21 15:15:27 +02:00
feat: add environment selection to database commands
- Introduced environmentId flag to all database commands (create, delete, deploy, stop) for specifying the environment. - Implemented interactive prompts for selecting project and environment if flags are not provided. - Enhanced error handling for cases with no available environments or database instances. - Updated type definitions to include Database for better type safety.
This commit is contained in:
@@ -11,6 +11,16 @@ export type Application = {
|
||||
// Add other application properties as needed
|
||||
};
|
||||
|
||||
export type Database = {
|
||||
mariadbId?: string;
|
||||
mongoId?: string;
|
||||
mysqlId?: string;
|
||||
postgresId?: string;
|
||||
redisId?: string;
|
||||
name: string;
|
||||
// Add other database properties as needed
|
||||
};
|
||||
|
||||
export type Environment = {
|
||||
name: string;
|
||||
environmentId: string;
|
||||
@@ -19,11 +29,11 @@ export type Environment = {
|
||||
env: string;
|
||||
projectId: string;
|
||||
applications: Application[];
|
||||
mariadb: any[];
|
||||
mongo: any[];
|
||||
mysql: any[];
|
||||
postgres: any[];
|
||||
redis: any[];
|
||||
mariadb: Database[];
|
||||
mongo: Database[];
|
||||
mysql: Database[];
|
||||
postgres: Database[];
|
||||
redis: Database[];
|
||||
compose: any[];
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user