Deploying a Project
takes 5 minutes to complete
This guide is also available in video form on the GovTech YouTube channel (opens in a new tab).
Before you begin
If you'd like to revisit these steps, visit Project Setup.
Here's what we've covered so far:
Signed up for an Airbase account
- Created a team and an Airbase project to deploy into
Installed the Airbase CLI
- Logged in to Airbase
Project Setup
- Configured a NextJS codebase with
airbase configure
- Linked the codebase to an Airbase project with
airbase link
Building and Deploying Projects
Build your application
Start by preparing your application for deployment with the airbase build
command.
airbase build
After making changes to code and resources, you'll need to run airbase build
again.
Building template-nextjs-helloworld with framework nextjs
> npx next build
... build output redacted ...
Successfully built template-nextjs-helloworld!
Run airbase deploy to launch your application! 🛫
Deploy your application
Airbase will use the environment variables in .env.local
for deployments by default. Read more about environment variables on Airbase.
This is it! Deploy your application to Airbase by running airbase deploy
, and selecting "Yes" in the confirmation prompt.
airbase deploy
Once your application is deployed, a link will be displayed at the bottom of your screen, like this.
? Deploy NextJS Hello World Template: template-nextjs-helloworld - default (production) Yes
Visit https://template-nextjs-helloworld.app.airbase.sg
That's it!
Your application is now deployed to Airbase. The application can be viewed at the URL in the terminal.
Now that you've shipped your first project, why not try one of these guides?