Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

I am deploying my NuxtJS app using a deployment script, which I added below. I use some of the instructions from this tutorial: https://www.digitalocean.com/community/tutorials/how-to-automate-deployment-using-circleci-and-github-on-ubuntu-18-04
If I access my droplet using SSH and run the deploy.sh script manually, it seems to work fine. But as soon as CircleCI starts a docker instance (see config.yml below), it needs at least 5 minutes to run the script, if I am lucky. And while doing that, the CPU of my droplet spikes, and it takes a lot of patience trying to reconnect with my droplet using SSH from my local machine.
Quite odd this only happens when running the script through CircleCI. I tried to spin up a medium docker instance, instead of a small, but without luck. Most of the time, the deployment is killed after 10 minutes, so I end up with a failed deployment most of the time.
If CircleCI fails, my droplet’s CPU stays over 100% and node_modules/.bin/nuxt build keeps running. Rebooting the droplet is the easiest solution (sometimes necessary, if reconnecting using SSH just isn’t possible or the terminal which is already connected, isn’t responding anymore). After reboot, the first CircleCi deployment succeeds and the rest fail again.
I looked at htop, and it seems that kswapd0 takes over 40% CPU, snapd over 30 and the rest are for node, etc.
#!/bin/bash
#move to project folder
cd /var/www/mywebsite.nl
#pull from the branch
git pull origin main
# build nuxt project and run pm2
npm install
npm run build
pm2 start
circleci config.yml
version: 2.1
jobs:
deploy:
docker:
- image: buildpack-deps:trusty
resource_class: small # we use a small docker instance to use as little credits as possible
steps:
- add_ssh_keys:
fingerprints:
- "xx:xx:xx:xx:xx:xx:xx:xx"
- run:
name: Deploy Over SSH
command: |
ssh -oStrictHostKeyChecking=no -v $SSH_USER@$SSH_HOST "./deploy.sh"
workflows:
build-and-deploy:
jobs:
- deploy:
filters:
branches:
only:
- main # only deploy on the main branch
Any thoughts?
My droplet: 1 GB Memory / 25 GB Disk / AMS3 - Ubuntu 20.04 (LTS) x64
ebeecroft
68aa2215160846bca0a00f952c5fdc
009fd274aeae48f2bfbda6ef568676
Cloudstream Apk
032f50ee7f7d489db3b05e204fe139
032f50ee7f7d489db3b05e204fe139
Edward Sitarski
ebeecroft
dashan
34bcef38725b4e6eb5224ae028f17e