deploy/classic/deployments.md
:::info Legacy Documentation
You are viewing legacy documentation for Deno Deploy Classic. We recommend migrating to the new <a href="/deploy/">Deno Deploy</a> platform.
:::
A deployment is a snapshot of the code and environment variables required to run
an application. A new deployment can be created
via deployctl or automatically via Deploy's Github
integration if configured.
Deployments are immutable after they have been created. To deploy a new version of the code for an application, a new deployment must be created. Once created, deployments remain accessible.
All available deployments are listed on your project page under the
Deployments tab, pictured below. Old deployments can be deleted
via deployctl and
via API.
There can also be other URLs that can point to a deployment, like custom domains.
<projectname--branchname>.deno.dev is also supported.
All deployments have a preview URL that can be used to view this specific
deployment. Preview URLs have the format
{project_name}-{deployment_id}.deno.dev.
A deployment can either be a production or a preview deployment. These
deployments do not have any differences in runtime functionality. The only
distinguishing factor is that a project's production deployment will receive
traffic from the project URL (e.g. myproject.deno.dev), and from custom
domains in addition to traffic to the deployment's preview URL.
Preview deployments can be "promoted" to production via the Deno Deploy Classic UI:
Promoting deployments to production is restricted to deployments that already
use the production KV database. This is particularly relevant for GitHub
deployments that use a different database for preview and production
deployments. Deployments (even those that use the preview KV database) can
always be redeployed to production using
the deployctl deployments redeploy command.
deployctlIf you are deploying your Deno code with deployctl, you can deploy directly to
production with the --prod flag:
deployctl deploy --prod --project=helloworld main.ts