Skip to content

Latest commit

 

History

History
65 lines (38 loc) · 1.72 KB

README.md

File metadata and controls

65 lines (38 loc) · 1.72 KB

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

Getting Started

  1. Fork/clone the repository

  2. install the necessary dependencies

    npm install
  3. Run the development server

    npm run dev
  4. Open http://localhost:3000 with your browser to view your Next.js app.

    advice-generator-app

Dockerize Your Application

  1. Install Docker (If you haven’t installed it already)

  2. Build the docker image

    docker build -t advice-generator .
  3. Run the docker image as a container

    docker run -p 3000:3000 advice-generator
  4. Navigate to http://localhost:3000/ in your web browser to access the application

Deploy on Back4App

  1. Push the application to a GitHub repository

  2. Set Up Your Back4app Account

  3. Create a Back4app CaaS application

    new-back4app-application

  4. Link your GitHub account to the Back4app application

    link-github

  5. Select the application’s repository

    select-repository

  6. Deploy the application

    deployed-application

Your Next.js app will now been deployed on the Back4app container platform!