Ajsalemo / DotNetCoreAPI-NextJS

A basic NextJS UI that connects to a ASP .NET Core API - used as a proof of concept for multicontainers/docker-compose on Azure

Home Page:https://ansalemo-nextjs-dotnetcoreapi-dockercompose.azurewebsites.net/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DotNetCoreAPI-NextJS

A Next application that uses Express, acting as a front-end, which calls to a ASP .NET Core API on Azure's Multicontainer(docker-compose) platform - used as a proof of concept for multicontainers/docker-compose on Azure.

Note: Multicontainers are currently in public preview and not recommended for production.

Usage:

The environment variable NEXT_PUBLIC_URL_API should be changed to the service(container name) that you're connecting to. If your API service in your docker-compose.yml file is named 'somecontainername', then change the variable or API endpoint to http://somecontainername:port of your API - for example:

http://dotnetcoreapi-container:5000

services:
  nextjsfrontend-container:
    image: yourcontainerregistry.azurecr.io/nextjsfrontend:yourtag
    ports:
      - "3000:3000"
    environment:
      - NEXT_PUBLIC_URL_API=${NEXT_PUBLIC_URL_API}

  dotnetcoreapi-container:
    image: yourcontainerregistry.azurecr.io/dotnetcoreapi:yourtag
    ports:
      - "5000:5000"

Optionally and more preferably, you can just add the above environment variable to your AppSettings within your Azure Application.

About

A basic NextJS UI that connects to a ASP .NET Core API - used as a proof of concept for multicontainers/docker-compose on Azure

https://ansalemo-nextjs-dotnetcoreapi-dockercompose.azurewebsites.net/


Languages

Language:C# 60.0%Language:JavaScript 26.7%Language:Dockerfile 11.6%Language:CSS 1.2%Language:Shell 0.5%