From 04a61c6200807c21c6b8755f2f95eed2235e2393 Mon Sep 17 00:00:00 2001
From: leic4u <32786903+leic4u@users.noreply.github.com>
Date: Tue, 21 Nov 2023 22:18:58 +0800
Subject: [PATCH] chore: update README.md (#194)
1. Add some badge for Github and Docker.
2. Update usage with Docker and Docker-Compose.
---
README.md | 80 ++++++++++++++++++++++++++++++++++++++++++++++++-------
1 file changed, 70 insertions(+), 10 deletions(-)
diff --git a/README.md b/README.md
index bc0051e2..f597c895 100644
--- a/README.md
+++ b/README.md
@@ -7,6 +7,16 @@
Yet another Nginx Web UI, developed by [0xJacky](https://jackyu.cn/) and [Hintay](https://blog.kugeek.com/).
[](https://github.com/0xJacky/nginx-ui/actions/workflows/build.yml)
+[](https://github.com/0xJacky/nginx-ui "Click to view the repo on Github")
+[](https://github.com/0xJacky/nginx-ui/releases/latest "Click to view the repo on Github")
+[](https://github.com/0xJacky/nginx-ui "Click to view the repo on Github")
+[](https://github.com/0xJacky/nginx-ui "Click to view the repo on Github")
+[](https://github.com/0xJacky/nginx-ui "Click to view the repo on Github")
+[](https://github.com/0xJacky/nginx-ui/issue "Click to view the repo on Github")
+
+[](https://hub.docker.com/r/uozi/nginx-ui "Click to view the image on Docker Hub")
+[](https://hub.docker.com/r/uozi/nginx-ui "Click to view the image on Docker Hub")
+[](https://hub.docker.com/r/uozi/nginx-ui "Click to view the image on Docker Hub")
## Documentation
To check out docs, visit [nginxui.com](https://nginxui.com).
@@ -65,7 +75,6 @@ English | [Español](README-es.md) | [简体中文](README-zh_CN.md) | [繁體
-
## About The Project

@@ -164,6 +173,7 @@ Stop Nginx UI with the follow command.
```shell
kill -9 $(ps -aux | grep nginx-ui | grep -v grep | awk '{print $2}')
```
+
#### With Systemd
If you are using the [installation script for Linux](#script-for-linux), the Nginx UI will be installed as `nginx-ui` service in systemd. Please use the `systemctl` command to control it.
@@ -192,20 +202,70 @@ you can easily make the switch.
1. When using this container for the first time, ensure that the volume mapped to /etc/nginx is empty.
2. If you want to host static files, you can map directories to container.
-**Docker Deploy Example**
+
+Deploy with Docker
+
+1. [Install Docker.](https://docs.docker.com/install/)
+
+2. Then deploy nginx-ui like this:
```bash
docker run -dit \
- --name=nginx-ui \
- --restart=always \
- -e TZ=Asia/Shanghai \
- -v /mnt/user/appdata/nginx:/etc/nginx \
- -v /mnt/user/appdata/nginx-ui:/etc/nginx-ui \
- -v /var/www:/var/www \
- -p 8080:80 -p 8443:443 \
- uozi/nginx-ui:latest
+--name=nginx-ui \
+--restart=always \
+-e TZ=Asia/Shanghai \
+-v /mnt/user/appdata/nginx:/etc/nginx \
+-v /mnt/user/appdata/nginx-ui:/etc/nginx-ui \
+-v /var/www:/var/www \
+-p 8080:80 -p 8443:443 \
+uozi/nginx-ui:latest
```
+3. When your docker container is running, Log in to nginx-ui panel with `http://:/install`.
+
+
+
+Deploy with Docker-Compose
+
+1. [Install Docker-Compose.](https://docs.docker.com/compose/install/)
+
+2. Creat a docker-compose.yml file like this:
+
+```yml
+version: '3.3'
+services:
+ nginx-ui:
+ stdin_open: true
+ tty: true
+ container_name: nginx-ui
+ restart: always
+ environment:
+ - TZ=Asia/Shanghai
+ volumes:
+ - '/mnt/user/appdata/nginx:/etc/nginx'
+ - '/mnt/user/appdata/nginx-ui:/etc/nginx-ui'
+ - ' /var/www:/var/www'
+ ports:
+ - 8080:80
+ - 8443:443
+ image: 'uozi/nginx-ui:latest'
+```
+
+3. Then creat your container by:
+
+```bash
+docker-compose up -d
+```
+
+```bash
+# If using docker-compose-plugin
+docker compose up -d
+```
+
+4. When your docker container is running, Log in to nginx-ui panel with `http://:/install`.
+
+
+
## Manual Build
On platforms that do not have an official build version, they can be built manually.