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.
Goto Jekyll Repo: https://github.com/wechaty/jekyll
Goto Docusaurus Repo: https://github.com/wechaty/docusaurus
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).
docker-compose up
You are all set.
We are using Nginx as the front end proxy for serving the website traffic, from the below two locations:
- Docusaurus Documentation https://wechaty.github.io/docusaurus/
- 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.
- for
/docs
locations, proxy pass to https://wechaty.github.io/ with a prefixdocusaurus
added to the path. - for
/{news,blogs,contributors,\d\d\d\d}
locations, proxy pass to https://wechaty.github.io/ with a prefixjekyll
added to the path.
Learn more from nginx.conf and docker-compose.yml files.
That's all.
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
- DEFAULT_EMAIL=wechaty@chatie.io
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:
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.
Split the repo into two: Jekyll & Docusaurus (Issue #1)
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
- Docs released under Creative Commons
- Code released under the Apache-2.0 License
- Code & Docs © 2021 Huan LI <zixia@zixia.net>