Deploy Static Sites
Static sites are websites that doesn't require server processing (e.g. connecting with database), so it only consist of HTML, CSS, JS files that sent as-is to the browser.
While static sites are works out of the box, nowadays static sites needed to build from many kinds of frontend tooling.
Most people built static sites with Node-based frontend tooling which includes Create React App, Gatsby
and Vite
. There are also other popular static site generators like Hugo
and Jekyll
.
Please read our Runner's Guide first if you haven't.
Recipes
- Express
- Vite
- Next.js
- Strapi
source: clear
features: ['node lts']
root: public_html/public
nginx:
passenger:
enabled: on
app_start_command: env PORT=$PORT npm start
commands:
- npx express-generator .
- npm i
A simple express website that outputs "Hello Express!"
source: clear
features: ['node lts']
nginx:
passenger:
enabled: on
app_start_command: env PORT=$PORT npm start
commands:
- npx express-generator .
A simple PHP that outputs "Hello, World!"
source: clear
features: ['node lts']
nginx:
fastcgi: on
commands:
- echo "Hello, World!" > index.php
A simple PHP that outputs "Hello, World!"
source: clear
features: ['node lts']
nginx:
fastcgi: on
commands:
- echo "Hello, World!" > index.php
A simple PHP that outputs "Hello, World!"
Let's extract those recipes meaning individually.