Linux command
cradle-deploy 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Deploy to production
cradle deploy production
Deploy to staging
cradle deploy staging
Deploy with custom configuration
cradle deploy --config [deploy.yml]
Preview changes
cradle deploy --dry-run production
Deploy specific branch
cradle deploy production --branch [release]
Skip database migrations
cradle deploy --no-migrate production
说明
cradle deploy is a deployment command for the Cradle PHP framework. It automates the process of deploying applications to remote servers, handling tasks like code synchronization, dependency installation, database migrations, and cache clearing. The command reads deployment configuration specifying server details, deployment paths, and environment-specific settings. It supports multiple environments, allowing different configurations for production, staging, and development servers. Deployment typically involves pushing code changes, running composer install, executing migrations, and clearing caches. The dry-run option lets you preview what changes will be made before committing to the deployment.
参数
- --config _FILE_
- Use custom deployment configuration file.
- --dry-run
- Preview deployment without making changes.
- --branch _BRANCH_
- Deploy a specific Git branch.
- --no-migrate
- Skip database migrations during deployment.
- --force
- Force deployment even with uncommitted changes.
- --verbose
- Show detailed deployment output.
- --help
- Display help information.
FAQ
What is the cradle-deploy command used for?
cradle deploy is a deployment command for the Cradle PHP framework. It automates the process of deploying applications to remote servers, handling tasks like code synchronization, dependency installation, database migrations, and cache clearing. The command reads deployment configuration specifying server details, deployment paths, and environment-specific settings. It supports multiple environments, allowing different configurations for production, staging, and development servers. Deployment typically involves pushing code changes, running composer install, executing migrations, and clearing caches. The dry-run option lets you preview what changes will be made before committing to the deployment.
How do I run a basic cradle-deploy example?
Run `cradle deploy production` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does --config _FILE_ do in cradle-deploy?
Use custom deployment configuration file.