Azure Container Apps is a fully managed serverless container service for building and deploying modern apps at scale.
It's a perfect choice for hosting fullstack web applications with server-side rendered components like Next.js or Remix.
This project is a minimalistic (but including Next.js essentials like Layout, Style Components, SG, SSR, SWR) example of a Next.js app running on Azure Container Apps.
It uses Dockerfile with multi-stage builds and automatically copied traced files via outputStandalone feature of Next.js to keep image size as small as possible.
-
Claim your free Azure credits if needed
-
Install
containerapp
extension of the Azure CLI
az extension add --name containerapp --upgrade
- Clone and deploy this starter as an Azure Container App with the name of your choice (
nextjs-aca
in the example below):
az containerapp up --name nextjs-aca --source .
Use the same command to deploy a new version of your app:
az containerapp up --name nextjs-aca --source .
- Dockerfile is based on with-docker example
- API call is based on api-routes example
Maxim Salnikov. Feel free to contact me if you have any questions about the project, Azure, Azure Container Apps, Azure Static Web Apps.