# Deploy vs redeploy

> Understand the difference between the Deploy and Redeploy buttons to choose the fastest option for your deployment needs.

Deploy vs redeploy
------------------

When deploying your application, you'll see two buttons in the deployment modal: **Deploy** and **Redeploy**. Understanding when to use each option helps you deploy faster and more efficiently.

### Deploy

The Deploy button triggers a full deployment that:

1. **Clones your repository** from the configured branch
2. **Builds a new Docker image** with your latest code and dependencies
3. **Pushes the image** to the container registry
4. **Deploys the new image** to your application

Use Deploy when you have code changes in your repository that need to be included in the deployment.

### Redeploy

The Redeploy button triggers a fast deployment that:

1. **Skips the build phase** entirely
2. **Reuses the existing Docker image** from your last successful deployment
3. **Applies all pending configuration changes** including environment variables, domains, resources, and other settings
4. **Restarts your application** with the updated configuration

Redeploy is significantly faster because it doesn't need to clone your repository or build a new image, while still applying all your configuration changes.

### When to use deploy

Use Deploy when you need to include code changes:

- **Code changes** - Any modifications to your repository
- **Dependency updates** - New packages in composer.json or package.json
- **Build command changes** - Updated build or init commands
- **PHP or Node.js version changes** - These require rebuilding the image

### When to use redeploy

Use Redeploy when you've only made configuration changes that don't require rebuilding your image:

- **Environment variables** - Adding, updating, or removing secrets
- **Custom domains** - Adding or removing domains
- **Resource allocation** - Changing CPU or memory settings
- **Scheduler settings** - Enabling or disabling the cron scheduler

These changes are applied when your application restarts, without needing new code.

### Upload-type applications

If your application uses source upload instead of a git repository, the Redeploy button is not available. Upload-type applications don't have a cached image from a git-based build, so every deployment runs the full build process.

When deploying an upload-type application, you can optionally include a new source archive. If you don't upload new source code, the deployment will rebuild using the previously uploaded archive.
