Report this

What is the reason for this report?

App Platform support for `release` process in Procfile or npm postinstall

Posted on January 20, 2021

I have come to DO App Platform from Heroku, and one teething problem i’ve had, is running processes after release, or during release for a Node.js app. Specifically running migrations .

In the past I’ve used postinstall, which usually works, but more recently I’ve used the release process type in a Procfile, which makes more sense.

DO doesn’t seem to support the release process type, but I wonder if i’m using it wrongly for DO?

web: npm start
release: npm run migrate

Also, I get unexpected behaviour using the postinstall method, as DO doesn’t run npm install when it has a cache of the node_modules I presume from package-lock.json.

I tried using a appspec.yml file, with an added build_command, and building via doctl apps create-deployment, but that doesn’t appear to run the postinstall command either.

  build_command: npm install --production

Any ideas?! :)

The developer cloud

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

Start building today

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