| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
parent directory.. | ||||
This document provides detailed instructions for deploying the ../chat NodeJS NextJS application on Azure using Docker and the Azure CLI.
Before you start the deployment, ensure the following environment variables are set. You will be prompted for any missing values when you run the deploy.sh script.
Login to Azure CLI: Run az login and follow the prompts to log in to your Azure account.
Create a Resource Group: Use the command az group create --name <ResourceGroupName> --location <Location> to create a new resource group in your preferred location.
Create Azure Container Registry (ACR): Execute az acr create --resource-group <ResourceGroupName> --name <RegistryName> --sku Basic --admin-enabled true to create a container registry.
Build Docker Image: Navigate to the ../chat directory and build your Docker image using docker build -t <RegistryName>.azurecr.io/chat-app:v1 ..
Push Docker Image to ACR: Log in to your ACR using az acr login --name <RegistryName> and then push your Docker image using docker push <RegistryName>.azurecr.io/chat-app:v1.
Deploy to Azure Container Instances (ACI): Deploy your application using az container create --resource-group <ResourceGroupName> --name chat-app-container --image <RegistryName>.azurecr.io/chat-app:v1 --cpu 1 --memory 1 --ports 3000 --dns-name-label chat-app --environment-variables NODE_ENV=production.
Access Your Application: Once deployed, your application will be accessible at http://chat-app.<Location>.azurecontainer.io:3000.
For convenience, a deploy.sh script is provided to automate the deployment process. Before running the script, ensure it has execution permissions by running chmod +x deploy.sh.
To deploy using the script, simply execute ./deploy.sh from the terminal. The script will guide you through the deployment process step by step and prompt you for any required environment variables that are not already set.
The script will also update your Dockerfile to include the following environment variables:
No database is required for the deployment of this application.
For more detailed information on each step, refer to the official Azure documentation and Docker documentation.
| Back | FazBrowse Home | New Git URL |