Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
kmahyyg committed May 2, 2024
1 parent a8c1e5a commit 0c8c59f
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ Set the following environment variable when create the container, and according
| MANDATORY | Name | Explanation | Default Value |
|:--------:|:--------:|:--------:|:--------:|
| YES | NODE_ENV | https://pugjs.org/api/express.html | production |
| no | HTTPS_HOST | Only Listen on HTTPS_HOST:HTTPS_PORT | NO DEFAULT |
| no | HTTPS_PORT | HTTPS_PORT | 3443 |
| no | HTTPS_HOST | HTTPS_HOST | NO DEFAULT, MEANS DISABLED |
| no | HTTPS_PORT | HTTPS_PORT | NO DEFAULT, MEANS DISABLED |
| no | HTTP_PORT | HTTP_PORT | 3000 |
| no | HTTP_ALL_INTERFACES | Listen on all interfaces, useful for reverse proxy, HTTP only | NO DEFAULT |

Expand All @@ -123,13 +123,21 @@ Set the following environment variable when create the container, and according
| no | ZTNCUI_PASSWD | generate admin password on the fly (if not exists) | password |
| YES | MYADDR | your ip address, public ip address preferred, will auto-detect if not set | NO DEFAULT |

Also, this image exposed an http server at port 3180, you could save file in `/mydata/ztncui/httpfs/` to serve it.
(You could use this to build your own root server and distribute planet file, even though, that won't hurt you, I still suggest to set a protection for both http servers in front.)

**WARNING: IF YOU DO NOT SET PASSWORD, YOU HAVE TO USE `docker container logs <CONTAINER_NAME / CONTAINER_ID>` to get your random password. This is a gatekeeper.**

To reset password of ztncui: delete file under `/mydata/ztncui/passwd` and set the environment variable to the password you want, then re-create the container. After application has been initialized, the password should ONLY be changed from the web page.

## Public File Server

| MANDATORY | Name | Explanation | Default Value |
|:--------:|:--------:|:--------:|:--------:|
| no | PLANET_RETR_PUBLIC | File server listened globally or only local | NO DEFAULT |

If `PLANET_RETR_PUBLIC` is set, then file server will listen on `0.0.0.0`, otherwise, `127.0.0.1` .
This image exposed an http server at port 3180, you could save file in `/mydata/ztncui/httpfs/` to serve it.
(You could use this to build your own root server and distribute planet file, even though, that won't hurt you, I still suggest to set a protection for both http servers in front.)

## Chinese users only

This script use https:///ip.sb for public IP detection purpose, which is blocked in some area of China Mainland. Under this circumstance, the program will try to detect public IP using `ifconfig` tool and might lead to unwanted result, to prevent this, make sure you set `MYADDR` environment variable when docker container is up.
Expand Down

0 comments on commit 0c8c59f

Please sign in to comment.