Skip to content

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

Notifications You must be signed in to change notification settings

gyto23/DotNetCoreAPI-NextJS

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

DotNetCoreAPI-NextJS

A basic NextJS UI that uses express.js which connects 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 and connecting between containers on the Docker 'bridge' network

Note: 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 is named 'somecontainername', then change the variable or API endpoint to http://yourapicontainername:port of your API - for example:

http://dotnetcoreapi-container:5000

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

  dotnetcoreapi-container:
    image: ansalemocontainerregistry.azurecr.io/dotnetcoreapi:v3
    ports:
      - "5000:5000"

A working example of this can be found here: https://ansalemo-nextjs-dotnetcoreapi-dockercompose.azurewebsites.net/

About

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

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 63.2%
  • JavaScript 28.2%
  • Dockerfile 7.3%
  • CSS 1.3%