We’ve made it easy for you to build on Glitch and deploy to DigitalOcean's App Platform as often as you like!
If you don't have a project in mind yet but want to try Digital Ocean deployment out, remix ~hello-digitalocean!
In your Glitch project, make sure you have a
.env file–if there isn't one already just create a new file and name it:
Get a DIGITALOCEAN_ACCESS_TOKEN from your DigitalOcean account. If you don't already have a DigitalOcean account, click here.
Once the token has been generated, copy and paste it into your Glitch project’s .env file as: DIGITALOCEAN_ACCESS_TOKEN
After you do this, a Deploy to DigitalOcean button will magically appear at the top of the project editor!
When you are ready to deploy your app, click the Deploy to DigitalOcean button.
This will create the application in your Digital Ocean account–you should see it in the Apps section.
In your Glitch project, the app ID will appear in your
.env file with the variable name
You'll see the build progress update in your Digital Ocean dashboard. Once your deployment is complete, back in Glitch, hit the Deploy button again. This will return the deployed app URL to your Glitch project, and it will be added to your
.env file as
DIGITALOCEAN_APP_URL (you can also get your published app URL in your Digital Ocean dashboard before deploying the second time).
- After deploying, you can continue to edit in Glitch - just click the Deploy button any time that you want to push your changes to DigitalOcean's App Platform.
Once your app URL is in your Glitch project you'll see a drop-down menu in the preview in your Glitch project. Select DEV for the version you're currently working on in Glitch, and PUB to see the published version of your app on Digital Ocean.
You can always visit your DigitalOcean dashboard to check the status of any of your apps running on App Platform too.
In-progress changes will still appear in real-time on Glitch, but you’ll need to click the Deploy to DigitalOcean button to update your app on App Platform.