Files
directus/docs/self-hosted/installation/ubuntu.md
Eron Donevan Powell 8b39c49da3 Docs: Self-Hosted Section + Updated Quickstart Guide (#13005)
* created self-hosted section, moved installation guides, and re-edited first draft of the cloud quickstart guide

* refactored step 1 into two steps

* added media

* pre-mgmt submission proofread

* pulled down on wrong branch.
Revert "pre-mgmt submission proofread"
This reverts commit dfd678d083.

* proof-edited

* forgot to save before last comit

* fixed italic issue where I started with _ and ended with *

* tiny tweaks

* tiny tweak 2.0

* tiny tweak 4

* tiny tweak 5
2022-05-27 15:34:38 -05:00

701 B

Ubuntu

DigitalOcean provides a great tutorial on how to run a Node.js based app in production. See How To Set Up a Node.js Application for Production on Ubuntu 20.04.

Instead of starting the app using pm2 start hello.js, add the line "start": "directus start" in the "scripts" part of the package.json and start Directus using the command pm2 start npm -- start

Example:

{
  "name": "directus",
  "version": "1.0.0",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
    "start": "directus start"
  },
...
}