Coder Social home page Coder Social logo

pest1999 / js.org Goto Github PK

View Code? Open in Web Editor NEW

This project forked from wechaty/js.org

0.0 0.0 0.0 252 KB

Wechaty Official Website for News, Blogs, Contributor Profiles, and Documentations.

Home Page: https://wechaty.js.org

License: Apache License 2.0

js.org's Introduction

wechaty official website

Wechaty Organization Website

Repository for the Wechaty Organization Website, a resource for the Wechaty Organization. It is the official Wechaty website for publishing latest news, blog posts, contributor profiles, and documentation from our open source community.

Docusaurus Jekyll

1. News, Blog, Contributor Profiles

Wechaty Jekyll

Goto Jekyll Repo: https://github.com/wechaty/jekyll

2. Documentation

Wechaty Docusaurus

Goto Docusaurus Repo: https://github.com/wechaty/docusaurus

Wechaty Official Website Transparent Proxy

This repo is the configuration for transparent proxy GitHub Pages of Jekyll and Docusaurus for merging them into our https://wechaty.js.org home page.

If you want to create blog post, or contribute to documentation, please visit the above repos (Jekyll & Docusaurus).

Usage

docker-compose up

You are all set.

Architecture

We are using Nginx as the front end proxy for serving the website traffic, from the below two locations:

  1. Docusaurus Documentation https://wechaty.github.io/docusaurus/
  2. Jekyll Posts https://wechaty.github.io/jekyll/
sequenceDiagram
    participant Visitor
    participant wechaty.js.org
    participant Nginx Transparent Proxy
    participant wechaty.github.io/docusaurus
    participant wechaty.github.io/jekyll

    Visitor->>wechaty.js.org: HTTPS
    wechaty.js.org->>Nginx Transparent Proxy: HTTP
    Note right of Nginx Transparent Proxy: Request files from GitHub Pages
    Nginx Transparent Proxy->>wechaty.github.io/docusaurus: HTTPS /docs
    wechaty.github.io/docusaurus-->>Nginx Transparent Proxy: HTTPS /docs
    Nginx Transparent Proxy->>wechaty.github.io/jekyll: HTTPS /{news,blog,contributors}
    wechaty.github.io/jekyll-->>Nginx Transparent Proxy: HTTPS /{news,blog,contributors}
    Nginx Transparent Proxy-->>wechaty.js.org: HTTP
    wechaty.js.org-->>Visitor: HTTPS

This repo is maintaining the docker-compose.yml for the Nginx Transparent Proxy layer (in the center of the above diagram) of the website.

Nginx Transparent Proxy Configuration

  1. for /docs locations, proxy pass to https://wechaty.github.io/ with a prefix docusaurus added to the path.
  2. for /{news,blogs,contributors,\d\d\d\d} locations, proxy pass to https://wechaty.github.io/ with a prefix jekyll added to the path.

Learn more from nginx.conf and docker-compose.yml files.

That's all.

Nginx Ingress Proxy Configuration

We are using Automated nginx proxy for Docker containers using docker-gen to set up a container running nginx and docker-gen. docker-gen generates reverse proxy configs for nginx and reloads nginx when containers are started and stopped.

See Automated Nginx Reverse Proxy for Docker, Jason Wilder, Mar 25, 2014 for why we are using this.

Here's an example docker-compose.yml configuration for the Nginx Ingress Proxy layer:

version: '3.8'
services:

  nginx-proxy:
    image: nginxproxy/nginx-proxy
    container_name: nginx-proxy
    network_mode: bridge
    ports:
      - 80:80
      - 443:443
    volumes:
      - conf:/etc/nginx/conf.d
      - vhost:/etc/nginx/vhost.d
      - html:/usr/share/nginx/html
      - dhparam:/etc/nginx/dhparam
      - certs:/etc/nginx/certs:ro
      - /var/run/docker.sock:/tmp/docker.sock:ro
    healthcheck:
      test: ["CMD", "true"]
      interval: 1m30s
      timeout: 10s
      retries: 3
      start_period: 40s

  letsencrypt:
    image: jrcs/letsencrypt-nginx-proxy-companion
    container_name: nginx-proxy-le
    network_mode: bridge
    environment:
      - NGINX_PROXY_CONTAINER=nginx-proxy
      - [email protected]
    volumes:
      - conf:/etc/nginx/conf.d
      - vhost:/etc/nginx/vhost.d
      - html:/usr/share/nginx/html
      - dhparam:/etc/nginx/dhparam
      - certs:/etc/nginx/certs:rw
      - /var/run/docker.sock:/var/run/docker.sock:ro

volumes:
  conf:
  vhost:
  html:
  dhparam:
  certs:

TLS Certificate Authorization (CA) Configuration

We are using Automated ACME SSL certificate generation for nginx-proxy lightweight companion container for nginx-proxy.

It handles the automated creation, renewal and use of SSL certificates for proxied Docker containers through the ACME protocol.

Resource

History

main (Mar 31, 2022)

Split the repo into two: Jekyll & Docusaurus (Issue #1)

Author

Huan LI is a serial entrepreneur, active angel investor with strong technology background. Huan is a widely recognized technical leader on conversational AI and open source cloud architectures. He co-authored guide books "Chatbot 0 to 1" and "Concise Handbook of TensorFlow 2" and has been recognized both by Microsoft and Google as MVP/GDE. Huan is a Chatbot Architect and speaks regularly at technical conferences around the world. Find out more about his work at https://github.com/huan

Copyright & License

  • Docs released under Creative Commons
  • Code released under the Apache-2.0 License
  • Code & Docs © 2021 Huan LI <[email protected]>

js.org's People

Contributors

huan avatar lijiarui avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.