distributed-nginx nginx k8s docker micro front-end

Overview

distributed-nginx (分布式 nginx)

🍙 适用于微前端的去中心化分布式部署 nginx 服务器.

特性

  • 支持 前端服务上线下线 自动更新微前端模块配置
  • 完全实现了分布式去中心化
  • 支持【微前端组】
  • 支持 redis 协议和 multicast-dns 协议
  • 支持 命名空间

Getting Started

Manually,

git clone https://github.com/yunqiangwu/distributed-nginx.git
cd distributed-nginx
yarn run test

访问环境

获取微前端配置信息

从第一个微前端模块访问第二个微前端模块的页面

从第一个微前端模块访问第二个微前端主模块的页面

从第一个微前端模块访问第三个未暴露访问端口的微前端主模块的页面

使用

mkdir project-dir
cd project-dit

创建文件

  • Dockerfile
FROM jonneywu/distributed-nginx:1
COPY dist /usr/share/nginx/html
  • dist/package.json
{
    "name": "front-service-name"
}
  • dist/packages/m2/package.json
{
    "name": "front-sub-service-name"
}

打包

docker build . -t nginx-test:1  --no-cache

测试

docker run -p 80:80 -ti --rm --name nginx-test nginx-test:1

环境变量配置

S_NAMESPACE

含义:命名空间, 用于部署不同开发环境的 nginx
默认值: hzero_front_

注意:配置长度不能超过 200 字符

USE_REDIS

含义:是否使用 redis 协议, 默认使用 mdns 协议
默认值: false

S_REDIS_HOST

含义:redis 服务器的 ip 或者 host
默认值: redis

S_REDIS_PORT

含义:redis 服务器 的 端口
默认值: 6379

You might also like...

Atlan is a CLI that helps you to manage local dockerized infrastructure without any needed knowledge on Docker and Docker Compose.

Atlan is a CLI that helps you to manage local dockerized infrastructure without any needed knowledge on Docker and Docker Compose.

Atlan CLI Atlan is a CLI that helps you to manage local dockerized infrastructure without any needed knowledge on Docker and Docker Compose. What is A

Aug 17, 2022

An example T3 app containerized with Docker, Docker Compose, and deployed on Railway

Create T3 App This is an app bootstrapped according to the init.tips stack, also known as the T3-Stack. What's next? How do I make an app with this? W

Dec 19, 2022

Pass trust from a front-end Algorand WalletConnect session, to a back-end web service

AlgoAuth Authenticate to a website using only your Algorand wallet Pass trust from a front-end Algorand WalletConnect session, to a back-end web servi

Dec 15, 2022

It consists of a recreation of Twitter, to put into practice both Front-end and Back-end knowledge by implementing the MERN Stack together with other technologies to add more value to the project.

Twitter-Clone_Back-end ✨ Demo. 💻 About the project. 📜 Descriptions. It consists of a recreation of Twitter, to put into practice knowledge of both F

Apr 12, 2022

It consists of a recreation of Twitter, to put into practice knowledge of both Front-end and Back-end implementing the MERN Stack along with other technologies to add more value to the project.

It consists of a recreation of Twitter, to put into practice knowledge of both Front-end and Back-end implementing the MERN Stack along with other technologies to add more value to the project.

Twitter-Clone_Front-end ✨ Demo. Login Home Profile Message Notifications Deployed in: https://twitter-clone-front-end.vercel.app/ 💻 About the project

Jun 26, 2022

Web-Technology with Aj Zero Coding. In this tutorial we learn front-end and back-end development.

Installation through NPM: The jQWidgets framework is available as NPM package: jQuery, Javascript, Angular, Vue, React, Web Components: https://www

Nov 19, 2022

My-portfolio - Built with Namecheap, Digital Ocean, Nginx, PM2, SSL, NextJs, Tailwind 3, Graphql, NexusJS, Prisma, Postgres, Passion and Love

Current Implementation technologies Nextjs with Typescript. Static pages/ Server side rendering. Easy peasy state management (Might not need it with i

Jan 10, 2022

Automated packaging of Debian-flavored NGINX with PageSpeed modules. Written in Bash and GitHub Workers. APT Repository hosted on Dokku.

NGINX + Google PageSpeed Configuring NGINX to build correctly is a pain. Not because of anything wrong with it, but rather because of how slim the sta

Oct 14, 2022

API of my readings, developed in Nest.js, MongoDB, Nginx and Dockerized

API of my readings, developed in Nest.js, MongoDB, Nginx and Dockerized

My Readings step by step for configuration with docker OBS: required docker and docker-compose cp -r .env.sample .env docker-compose up example what t

Jul 1, 2022
Owner
wuyun
wuyun
A front end GUI for interacting with the Stable Horde / Stable Diffusion distributed cluster

ArtBot for Stable Diffusion See it in action: https://tinybots.net/artbot ArtBot is a front-end GUI for generating images and photos with Stable Diffu

Dave Schumaker 39 Jan 2, 2023
Unofficial HelmRelease search through awesome k8s-at-home projects

k8s at home search (unofficial) Search Flux HelmReleases through awesome k8s-at-home projects, check it out at https://whazor.github.io/k8s-at-home-se

Nanne 92 Jan 2, 2023
A secure MERN Stack boilerplate ready for Production that uses Docker & Nginx.

A production ready & secure boilerplate for the MERN Stack that uses Docker & Nginx. Focus on the product and not the setup. You can directly start wo

Karan Jagtiani 34 Dec 23, 2022
Fast & Robust Front-End Micro-framework based on modern standards

Chat on gitter Hello slim.js - your declarative web components library import { Slim } from 'slim-js'; import { tag, template } from 'slim-js/decorato

slim.js 942 Dec 30, 2022
`raaghu-mfe` is an opensource micro front end framework built on top of `raaghu-elements`, Bootstrap 5 and Storybook offering highly customizable UI components and built-in pages

`raaghu-mfe` is an opensource micro front end framework built on top of `raaghu-elements`, Bootstrap 5 and Storybook offering highly customizable UI components and built-in pages. Raaghu mfe can be used as a base to build complex components and UI layouts whilst maintaining a high level of reusability,flexibility with ease of maintenance.

Wai Technologies 160 Dec 30, 2022
Micro.publish is an Obsidian plugin to publish notes directly to Micro.blog, written in TypeScript

Micro.publish Micro.publish is a community maintained plugin for Obsidian to publish notes to a Micro.blog blog. Installing This plugin will be availa

Otavio Cordeiro 14 Dec 9, 2022
A docker container with a wide variety of tools for debugging and setting up micro-services

Frame One Software Placeholder There are numerous times during the dev ops deployments, that a placeholder container is needed. In the past, Frame One

Frame One Software 8 May 29, 2022
A Turborepo with Strapi v4 (w/ postgres database) + Next.js powered by docker and docker-compose

Turborepo + Strapi + Next.js + Docker A Turborepo with Strapi v4 (w/ postgres database) + Next.js powered by docker and docker-compose. ⚠️ Prerequisit

Elvin Chu 60 Dec 29, 2022
Docker Extension to backup and restore docker volumes.

vackup-docker-extension This repository contains a Docker Extension that backups Docker volumes. This extension is purely a demonstration of how it'd

Felipe Cruz Martinez 34 Dec 28, 2022
This provides an extension integration with Docker Desktop to run k9s quickly and easily through the Docker Desktop interface.

k9s extension for Docker Desktop This provides an extension integration with Docker Desktop to allow k9s quickly and easily through the Docker Desktop

James Spurin 14 Dec 16, 2022