Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/webmaxru/nextjs-azure-container-apps-starter
https://github.com/webmaxru/nextjs-azure-container-apps-starter
azure azure-container-apps nextjs
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/webmaxru/nextjs-azure-container-apps-starter
- Owner: webmaxru
- Created: 2022-05-01T20:56:16.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-05-03T00:42:56.000Z (over 2 years ago)
- Last Synced: 2023-08-20T08:47:53.995Z (over 1 year ago)
- Topics: azure, azure-container-apps, nextjs
- Language: JavaScript
- Homepage: https://aka.ms/learn-aca
- Size: 81.1 KB
- Stars: 14
- Watchers: 2
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Next.js on Azure Container Apps starter
[Azure Container Apps](https://azure.microsoft.com/en-us/services/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](https://nextjs.org/) or [Remix](https://remix.run/).
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](https://github.com/webmaxru/nextjs-azure-container-apps-starter/blob/main/Dockerfile) with multi-stage builds and automatically copied traced files via [outputStandalone](https://github.com/webmaxru/nextjs-azure-container-apps-starter/blob/main/next.config.js#L3) feature of Next.js to keep image size as small as possible.
## How to scaffold an Azure Container App
0. [Claim your free Azure credits](https://aka.ms/free-azure-pass) if needed
1. [Install Azure CLI](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli?view=azure-cli-latest)
2. Install `containerapp` extension of the Azure CLI
```bash
az extension add --name containerapp --upgrade
```3. Clone and deploy this starter as an Azure Container App with the name of your choice (`nextjs-aca` in the example below):
```bash
az containerapp up --name nextjs-aca --source .
```## How to deploy a new version
Use the same command to deploy a new version of your app:
```bash
az containerapp up --name nextjs-aca --source .
```## About
### Credits
- Dockerfile is based on [with-docker example](https://github.com/vercel/next.js/tree/canary/examples/with-docker)
- API call is based on [api-routes example](https://github.com/vercel/next.js/tree/canary/examples/api-routes)### Author
[Maxim Salnikov](https://twitter.com/webmaxru). Feel free to contact me if you have any questions about the project, Azure, Azure Container Apps, Azure Static Web Apps.