Usage
This page explains how to get started with rehua.
Deployment steps
- Install docker on the server
- Download the
dockerfolder from BozhanL/rehua-doc. You can either rungit clone https://github.com/BozhanL/rehua-doc.gitor click https://github.com/BozhanL/rehua-doc/archive/refs/heads/main.zip to download entire repository, and delete unwanted files - Enter the
dockerfolder bycd docker - (Optional) Edit
nginx/html/create_web.shfile to choose web version. Default ismain - Execute
nginx/html/create_web.shto download and compile the web - (Optional) Edit the image version for
apiincompose.yamlto match web version. Default ismain - Edit username, password, connection string for mongo in
mongo/mongo_username.txt,mongo/mongo_password.txt,mongo/mongodb_url.txt. Default isadmin - Execute
certs/create_test_cert.shto create internal certificates - Edit
nginx/conf/conf.d/rehua.confto changeserver_nameto your own domain. - Put SSL/TLS certificate and private key into the local
certs/nginxfolder, and updatessl_certificateandssl_certificate_keyinnginx/conf/conf.d/rehua.conf. (This folder is mounted into the nginx container at/cert.) - Run
docker compose up -dto start all services.
Structure diagram
architecture-beta
group servers(server)[Servers]
group main(server)[Main server] in servers
group backup(server)[Backup server] in servers
service db(database)[Database] in main
service disk1(disk)[Storage] in main
service nginx(server)[HTTP gateway] in main
service web(server)[Web services] in main
service api(server)[API services] in main
service disk2(disk)[Backup server] in backup
api:L -- R:nginx
web:T -- B:nginx
db:L -- R:api
web:R -- L:disk1
api:B -- T:disk1
disk1:B --T:disk2
disk1:R --T:db
group staff(server)[Staff]
junction j0 in staff
service computer(server)[Computer] in staff
service tablet(server)[Tablet] in staff
tablet:T -- B:j0
computer:R -- L:j0
service router(internet)[Router]
junction j1
junction j2
j0:R -- L:j1
router:R --L:nginx
j1:T -- B:router