This repository demonstrates dockerizing and deploying a Next.js application to Back4app Containers.
The project is bootstrapped using create-next-app
.
To learn more, visit this article How to Deploy a Next.js Application
-
Fork/clone the repository
-
install the necessary dependencies
npm install
-
Run the development server
npm run dev
-
Open http://localhost:3000 with your browser to view your Next.js app.
-
Install Docker (If you haven’t installed it already)
-
Build the docker image
docker build -t advice-generator .
-
Run the docker image as a container
docker run -p 3000:3000 advice-generator
-
Navigate to http://localhost:3000/ in your web browser to access the application
-
Push the application to a GitHub repository
-
Set Up Your Back4app Account
-
Create a Back4app CaaS application
-
Link your GitHub account to the Back4app application
-
Select the application’s repository
-
Deploy the application
Your Next.js app will now been deployed on the Back4app container platform!