Gatsby Example
Gatsby is an open-source static site generator which is built on Node.js and utilizes React and GraphQL. This documentation provides detailed instructions on how to deploy your Gatsby project using Flightcontrol.
Prerequisites
- Get started with Gatsby (opens in a new tab)
- Create a Flightcontrol account (opens in a new tab)
- Create an AWS account (opens in a new tab)
- Create a GitHub account (opens in a new tab)
Instructions
Create a nixpacks.toml
file in your Gatsby Project. Our Nixpacks build type will detect the Gatsby project as a Node.js project for installation, but there are two additional packages that also need to be included for a successful build.
Use the following as the contents of the nixpacks.toml
file:
[phases.setup]
nixPkgs = ['...','python311']
aptPkgs = ['build-essential']
The nixpacks.toml
file provides a declarative way to specify project dependencies.
After adding this file, you can configure your project with Flightcontrol.
Configuration Options
- Connect your project using GitHub
- Select a GUI config type
- Select your environment
- Select the Gatsby.js preset
- Add a service
- Configure the following settings in Build System
#Install Command
npm install
#Start Command
gatsby serve --port 3000 -H 0.0.0.0
- Add an AWS region
- Adjust any configuration as needed.
- Click "Create Project" and complete any required steps (like linking your AWS account).
Flightcontrol supports Server Side Rendering (opens in a new tab) and Image CDN (opens in a new tab) for Gatsby.