Skip to content

Latest commit

 

History

History
59 lines (48 loc) · 1.54 KB

File metadata and controls

59 lines (48 loc) · 1.54 KB

The repository was taken as a basis mf-nextjs

Description

I have expanded this example based on the original. Adding dockerization, typescript, monorepo mode with ssr and remote mode without ssr.

Alert

It is not recommended in production, because it can cause unintended errors, the library used @module-federation/nextjs-mf, has a version higher than in this repository, but there are problems with it.

Deployed demo links

Examples on vercel, remote mode only, without SSR.
Shell app
App1
App2

Local

$ yarn install
$ make -B .env env=local
$ yarn dev

# http://localhost:3000 - main app
# http://localhost:3001 - cube app
# http://localhost:3002 - prisma app

Build Monorepo

$ yarn install
$ make -B .env env=local
$ yarn build
$ yarn start

# http://localhost:3000 - main app
# http://localhost:3001 - cube app
# http://localhost:3002 - prisma app

Docker Monorepo (SSR mode)

$ make -B .env env=local
$ docker-compose -f "docker-compose-monorepo.yml" up -d --build 
# http://localhost:3000 - main app
# http://localhost:3001 - cube app
# http://localhost:3002 - prisma app

Docker Remote (No SSR mode)

$ make -B .env env=local
$ docker-compose -f "docker-compose.yml" up -d --build 
# http://localhost:3000 - main app
# http://localhost:3001 - cube app
# http://localhost:3002 - prisma app