WIP notes
Droplets
SSH Access
📄 Main doc: "How to Connect to Droplets with SSH"
Notes:
- Once you have an existing droplet, you cannot upload new SSH keys via the dashboard - you instead have to follow these steps
- Default login, for both SSH and password, is
root@{droplet_ip_address}
Using SSH with a New User Account
If you have just created a new user account, to move away from using root
as your login, you will need to provision that new user account for SSH by taking a few steps. You can find them in my SSH notes page.
Droplets - Troubleshooting
- NPM install freezes / crashes the terminal
- You are probably exceeding the RAM that is available in your Droplet's plan. Try using
top
orhtop
to track usage while installing.- If you are exceeding what is available, either upgrade your droplet to a plan with more RAM, or (discouraged) add system swap.
- You are probably exceeding the RAM that is available in your Droplet's plan. Try using
DigitalOcean App Platform
DigitalOcean App Platform is a new offering from DO, which is a fully-managed (meaning that you, as a dev, don't have to deal with Ops stuff like system dependencies, install scripts, etc.) platform for deploying web applications. Many types of apps can be deployed with just a few clicks, and can scale up or down with ease.
App Platform - Troubleshooting
- Build error:
sh 1: {dependency}: not found
- One issue that I ran into with App Platform is that the first install / deployment would always work, but subsequent deployments from the same component would fail. The error would be something like the above. In my case, it was when the build script tried to run
vite build
, and would throwsh: 1: vite: not found
. It made no sense, sincevite
was a dependency of my project, and should exist in the PATH at build time. - I finally tracked it down to a key thing about App Platform: it does not install devDependencies!
- I used the workaround left in the comments -
npm install --only=dev && npm run build && npm prune --production
, but for many projects it might be far easier just to move things to regulardependencies
- I used the workaround left in the comments -
- One issue that I ran into with App Platform is that the first install / deployment would always work, but subsequent deployments from the same component would fail. The error would be something like the above. In my case, it was when the build script tried to run