|
| 1 | +--- |
| 2 | +title: "Getting started" |
| 3 | +description: "Step-by-step guide to creating and configuring your first Deno Deploy Early Access application, including organization setup, build configuration, environment variables, and deployment monitoring." |
| 4 | +--- |
| 5 | + |
| 6 | +:::caution |
| 7 | + |
| 8 | +Deno Deploy EA is in private access. You must be explicitly granted permission |
| 9 | +to use it, otherwise you will be unable to visit the new dashboard. |
| 10 | + |
| 11 | +::: |
| 12 | + |
| 13 | +## Create an organization |
| 14 | + |
| 15 | +To get started with Deno Deploy EA, you must first create a Deno Deploy EA |
| 16 | +organization. You can do this by visiting [app.deno.com](http://app.deno.com). |
| 17 | + |
| 18 | +Upon first visiting the dashboard, you’ll be greeted by the Deno Deploy EA |
| 19 | +organization creation screen: |
| 20 | + |
| 21 | + |
| 22 | + |
| 23 | +You can not currently create an organization that has the same slug as any |
| 24 | +project name in Deno Deploy Classic. |
| 25 | + |
| 26 | +Currently, the organization name and organization slug can not be changed after |
| 27 | +organization creation. |
| 28 | + |
| 29 | +## Create an app |
| 30 | + |
| 31 | +After creating an organization, you will be redirected to the organization apps |
| 32 | +page, where you can see the list of all organizations in the app. From here you |
| 33 | +can navigate to the organization settings, and the custom domains list which |
| 34 | +manages the custom domains attached to your organization. |
| 35 | + |
| 36 | +To create an app, press the `+ New App` button: |
| 37 | + |
| 38 | + |
| 39 | + |
| 40 | +An application is a single deployed web service with one build configuration, |
| 41 | +build history, environment variables, attached custom domains, a linked GitHub |
| 42 | +repository, etc. |
| 43 | + |
| 44 | +## Select a repo |
| 45 | + |
| 46 | + |
| 47 | + |
| 48 | +Next, you will need to select the GitHub repository to deploy your app code |
| 49 | +from. At time of writing, you must deploy from a GitHub repository. |
| 50 | + |
| 51 | +If your repository does not show up, use the `Add another GitHub account` or |
| 52 | +`Configure GitHub App permissions` buttons in the user/org, or repo dropdowns to |
| 53 | +grant the Deno Deploy GitHub app permission to deploy your repositories. |
| 54 | + |
| 55 | +> ⏳ We do not yet support deploying mono-repos (for examples, repos where the |
| 56 | +> actual application lives entirely in a subdirectory). |
| 57 | +
|
| 58 | +## Configure your app |
| 59 | + |
| 60 | +After selecting a GitHub repository, Deno Deploy EA will automatically attempt |
| 61 | +to detect the kind of application you are deploying and determine appropriate |
| 62 | +build configuration. You can see the detected configuration in the `App Config` |
| 63 | +box on the top right. |
| 64 | + |
| 65 | + |
| 66 | + |
| 67 | +If the build configuration was incorrectly detected, or you want to make changes |
| 68 | +to it, click the `Edit build config` button to open the build config drawer. |
| 69 | + |
| 70 | + |
| 71 | + |
| 72 | +## Configure your build |
| 73 | + |
| 74 | +In the build config drawer you can edit the framework preset. If you are not |
| 75 | +using a framework, or are using a framework that is not in the list, select |
| 76 | +`No Preset`. |
| 77 | + |
| 78 | +You can then edit multiple options depending on what preset you have selected: |
| 79 | + |
| 80 | +### install command |
| 81 | + |
| 82 | +If you need to install dependencies before running the build command, such as |
| 83 | +`npm install`, `deno install`, or similar, enter this command here. If you are |
| 84 | +deploying a Deno application that does not have a `package.json`, you can |
| 85 | +usually leave this empty. |
| 86 | + |
| 87 | +### Build command |
| 88 | + |
| 89 | +The command to execute to take your source code and build/bundle/compile the |
| 90 | +application to be able to deploy it. This could be a framework build command |
| 91 | +such as `next build`, a build task in your `package.json` or `deno.json`, or a |
| 92 | +any other shell script. If your application does not have a build command, such |
| 93 | +as a server-side Deno application with a JavaScript or TypeScript entrypoint, |
| 94 | +you can leave this field empty. |
| 95 | + |
| 96 | +### Runtime configuration |
| 97 | + |
| 98 | +For most frameworks there are no options to configure here, as Deno Deploy EA |
| 99 | +will figure out the ideal runtime configuration for the app based on the |
| 100 | +framework preset. When a framework is not configured, you can choose here |
| 101 | +whether the app is a `Dynamic` app that needs to execute code server side for |
| 102 | +every request, such as an API server, server-side rendered application, etc., or |
| 103 | +a `Static` app that consists only of a set of static files that need to be |
| 104 | +hosted. |
| 105 | + |
| 106 | +### Dynamic Entrypoint |
| 107 | + |
| 108 | +The JavaScript or TypeScript file that should be executed to start the |
| 109 | +application. This is the file path that you would pass to`deno |
| 110 | +run`locally to |
| 111 | +start the app. The path has to be relative to the working directory. |
| 112 | + |
| 113 | +### Dynamic arguments |
| 114 | + |
| 115 | +Additional command line arguments to pass to the app on startup, after the |
| 116 | +entrypoint. These are arguments that are passed to the application not to Deno |
| 117 | +itself. |
| 118 | + |
| 119 | +### Static Directory |
| 120 | + |
| 121 | +The directory in the working directory that contains the static files to be |
| 122 | +served. For example,`dist`,`_site`, or`.output`. |
| 123 | + |
| 124 | +### Single Page App mode |
| 125 | + |
| 126 | +Whether the application is a single page app that should have the root |
| 127 | +`index.html` served for any paths that do not exist as files in the static |
| 128 | +directory, instead of a 404 page. |
| 129 | + |
| 130 | +Closing the drawer saves the settings. |
| 131 | + |
| 132 | +### Environment variables |
| 133 | + |
| 134 | +On this page, you can also add environment variables by pressing the |
| 135 | +`Add/Edit environment variables` button: |
| 136 | + |
| 137 | + |
| 138 | + |
| 139 | +In this drawer, press the `+ Add variable` button to create a new environment |
| 140 | +variable for this project. You can give it a name, a value, and select whether |
| 141 | +this variable should be saved in plain text (you can view the value from the |
| 142 | +console later), or as a secret (you can not view the value from the console |
| 143 | +later). |
| 144 | + |
| 145 | +You can also select what contexts the environment variable should be available |
| 146 | +in. The available contexts are: |
| 147 | + |
| 148 | +- **Production:** requests hitting your application through one of the |
| 149 | + production domains, such as `<app>.<org>.deno.net`, or a custom domain. |
| 150 | +- **Development:** requests hitting preview domains, or git branch domains of |
| 151 | + your application. |
| 152 | + |
| 153 | +Environment variables must be added to at least one context, but can be added to |
| 154 | +multiple, or even all contexts. |
| 155 | + |
| 156 | +To save the environment variables, press the save button. You can re-open the |
| 157 | +drawer to edit / remove environment variables you have added. |
| 158 | + |
| 159 | +You can also edit the app name on this page, and select which region(s) the |
| 160 | +application should be served from. |
| 161 | + |
| 162 | +## Build and deploy your app |
| 163 | + |
| 164 | +Finally, you can press the `Create App` button to create the app. This will |
| 165 | +create the app and immediately trigger the first build: |
| 166 | + |
| 167 | + |
| 168 | + |
| 169 | +On the build page you can see live streaming build logs split into multiple |
| 170 | +sections: |
| 171 | + |
| 172 | +- **Prepare:** cloning the GitHub repository and restoring build cache |
| 173 | +- **Install:** executing the install command, and any framework specific |
| 174 | + pre-install setup |
| 175 | +- **Build:** executing the build command, any framework specific pre- and |
| 176 | + post-build setup, and preparing the build artifact for deployment |
| 177 | +- **Warm up:** sending a request to the preview URL of the deployment to ensure |
| 178 | + it starts up correctly. The logs shown in the Warm up section are Runtime |
| 179 | + logs, not build logs. |
| 180 | +- **Route:** Deno Deploy is rolling out the new version of this build into all |
| 181 | + global regions. |
| 182 | + |
| 183 | +In the top left of this build is a button to cancel the build. For failed |
| 184 | +builds, there is also a button to restart the build. |
| 185 | + |
| 186 | +For completed builds, the top right shows the preview URL of the build. Further |
| 187 | +down all timelines that this build is deployed to are shown, such as |
| 188 | +`Production`, or `Git Branch` timelines. |
| 189 | + |
| 190 | +You can also see how the build was triggered on this page. This can either be |
| 191 | +`manual action`, for builds triggered through the UI, or `GitHub repo` for |
| 192 | +builds triggered through the GitHub integration. |
| 193 | + |
| 194 | +You can view the application through either the preview URL, or any of the other |
| 195 | +URLs shown in the timelines list. |
| 196 | + |
| 197 | +## Monitor your application |
| 198 | + |
| 199 | +After visiting your application, you can view telemetry about your application |
| 200 | +in the form of the logs and traces available in our observability panels: |
| 201 | + |
| 202 | +- observability |
| 203 | +- settings |
0 commit comments