Build a status page with just one command. and only one output file
292
Build a status page with just one command. and only one output file.
docker run --rm -ti -p 8081:80 \
-e STATUS_EXAMPLE_NAME=Example \
-e STATUS_EXAMPLE_TYPE=http \
-e STATUS_EXAMPLE_URL=http://www.example.com/ \
phyng/self-status-page:latest
open http://localhost:8081/ and everything is OK.
If you need to use more complex configuration and persistent history, you can create a data folder and mount it inside the container.
At the same time, it supports to manage the configuration through data/config.env, and then start it with the following command
# replace /path/to/data to you absolute path
docker run -d --restart always \
-p 8081:80 \
--name self-status-page \
-v /path/to/data:/usr/src/app/data \
phyng/self-status-page:latest
You can refer to the data/config.env file.
Since the environment variables are flat and the key cannot be repeated, we implement the complex configuration by using unique key for the environment variables. The following configuration file examples follow the following rules
STATUS_<taskId>_NAME to declare a detection task, set the task type by STATUS_<taskId>_TYPE, and set the task attributes for other STATUS_<taskId>_*STATUSGROUP_{groupId}_NAME to declare a task group, use STATUSGROUP_{taskId}_TASKS to set the task ID under the group, ungrouped tasks are classified as SERVICES group by default# declare a task with ID EXAMPLE, of type http
STATUS_EXAMPLE_NAME=Example
STATUS_EXAMPLE_TYPE=http
STATUS_EXAMPLE_URL=http://www.example.com/
STATUS_GITHUB_NAME=Github
STATUS_GITHUB_TYPE=http
STATUS_GITHUB_URL=https://github.com/
# declare the Search group, including two tasks BING and GOOGLE_DNS
STATUSGROUP_SEARCH_NAME=Search
STATUSGROUP_SEARCH_TASKS=BING,GOOGLE_DNS
# declare ping task
STATUS_GOOGLE_DNS_NAME=Google DNS
STATUS_GOOGLE_DNS_TYPE=ping
STATUS_GOOGLE_DNS_IP=8.8.8.8
STATUS_BING_NAME=Bing
STATUS_BING_TYPE=http
STATUS_BING_URL=https://bing.com/
STATUS_CONFIG_TIMEOUT=10
STATUS_CONFIG_INTERVAL=30
STATUS_CONFIG_TITLE=Self status page
STATUS_CONFIG_TITLE_BACKGROUND=#607d8b
data/index.html file regularly to facilitate integration and deploymentContent type
Image
Digest
Size
17.8 MB
Last updated
over 5 years ago
docker pull phyng/self-status-page