Skip to content

Commit

Permalink
fix readme bugs and update screenshot figures
Browse files Browse the repository at this point in the history
  • Loading branch information
ffengc committed May 26, 2024
1 parent 0548e1f commit b227591
Show file tree
Hide file tree
Showing 202 changed files with 160 additions and 25 deletions.
102 changes: 102 additions & 0 deletions README-cn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
# ZDSwap
面向中山大学的二手交易小程序:校园转转

- **[简体中文](./README-cn.md)**
- **[English](./README.md)**

<div align="center">

## 面向中山大学的二手交易小程序:校园转转
[📄[Document](hhttps://github.com/ffengc/ZDSwap/blob/main/README.md)] &emsp; [💻[Platform](https://www.nginx.org.cn/)] &emsp; <br>
[🌅[Code](https://github.com/ffengc/ZDSwap)] &emsp;<br>

</div>

***

- [ZDSwap](#zdswap)
- [面向中山大学的二手交易小程序:校园转转](#面向中山大学的二手交易小程序校园转转)
- [🌟项目成员🌟](#项目成员)
- [📃项目页面结构](#项目页面结构)
- [📸项目效果](#项目效果)
- [🐳用docker部署nginx服务](#用docker部署nginx服务)

***

## 🌟项目成员🌟

- Yufc([ffengc](https://github.com/ffengc))
- Songwh([ssugarwh](https://github.com/ssugarwh))
- Linjy([ssugarwh](https://github.com/ssugarwh))
- Pengyx([KuroisuSan](https://github.com/KuroisuSan))
- Liy([*](#))


## 📃项目页面结构

下图展示了本项目所有页面。

![](./assets/structure.png)

## 📸项目效果

**主页面:**

![](./assets/home.png)

其他页面不在这里展示了。

## 🐳用docker部署nginx服务

克隆仓库:
```bash
https://github.com/ffengc/ZDSwap.git
cd ZDSwap;
```

使用dockerfile进行部署:

**1. 创建dockerfile文件**

```dockerfile
FROM nginx:latest
COPY ./wwwroot /usr/share/nginx/html
EXPOSE 8080
CMD ["nginx", "-g", "daemon off;"]
```

**2. 给文件添加权限**

创建脚本`ChMod.sh`

```bash
#!/bin/bash
# write by Yufc
# 检查是否提供了目录作为参数
if [ "$#" -ne 1 ]; then
echo "Usage: $0 <directory>"
exit 1
fi
# 获取目录参数
directory=$1
# 检查目录是否存在
if [ ! -d "$directory" ]; then
echo "Error: Directory does not exist."
exit 1
fi
# 为目录及其子目录下的所有文件和文件夹增加权限
find "$directory" -type d -exec chmod a+rwx {} \;
find "$directory" -type f -exec chmod a+rwx {} \;
echo "ALL permissions have been added to all files and directories within $directory."
```

运行脚本: `./ChMod.sh ./wwwroot`

**3. 部署服务**

```bash
docker build -t nginx-homepage .
docker run -d -p 8080:80 nginx-homepage
```

**部署后访问服务器8080端口即可。**
83 changes: 58 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,64 @@
# ZDSwap
面向中山大学的二手交易小程序:校园转转
Second-hand transaction applet for Sun Yat-sen University: ZDSwap

## 成员
- **[简体中文](./README-cn.md)**
- **[English](./README.md)**

- 俞沣城
- 宋文慧
- 林佳盈
- 彭宇璇
- 李悦

## 项目链接
<div align="center">

- index-site: [index.html](http://47.120.41.234:8080/index.html)
- home-site: [home.html](http://47.120.41.234:8080/home.html)
- login-site: [intro.html](http://47.120.41.234:8080/intro.html)
## Second-hand transaction applet for Sun Yat-sen University: ZDSwap
[📄[Document](hhttps://github.com/ffengc/ZDSwap/blob/main/README.md)] &emsp; [💻[Platform](https://www.nginx.org.cn/)] &emsp; <br>
[🌅[Code](https://github.com/ffengc/ZDSwap)] &emsp;<br>

## how to run with docker

克隆仓库:
</div>

***

- [ZDSwap](#zdswap)
- [Second-hand transaction applet for Sun Yat-sen University: ZDSwap](#second-hand-transaction-applet-for-sun-yat-sen-university-zdswap)
- [🌟Collaborators🌟](#collaborators)
- [📃Project page structure](#project-page-structure)
- [📸Screenshots](#screenshots)
- [🐳Deploy nginx service with docker](#deploy-nginx-service-with-docker)

***

## 🌟Collaborators🌟

- Yufc([ffengc](https://github.com/ffengc))
- Songwh([ssugarwh](https://github.com/ssugarwh))
- Linjy([ssugarwh](https://github.com/ssugarwh))
- Pengyx([KuroisuSan](https://github.com/KuroisuSan))
- Liy([*](#))


## 📃Project page structure

The picture below shows all the pages of this project.

![](./assets/structure.png)

## 📸Screenshots

**home page:**

![](./assets/home.png)

Other pages are not shown here.

## 🐳Deploy nginx service with docker

Clone the repository:
```bash
https://github.com/ffengc/ZDSwap.git
cd ZDSwap
cd ZDSwap;
```

使用dockerfile进行部署:
Deploy using dockerfile:

**1. 创建dockerfile文件**
**1. Create dockerfile**

```dockerfile
FROM nginx:latest
Expand All @@ -34,38 +67,38 @@ EXPOSE 8080
CMD ["nginx", "-g", "daemon off;"]
```

**2. 给文件添加权限**
**2. Add permissions to files**

创建脚本`ChMod.sh`
Create script`ChMod.sh`

```bash
#!/bin/bash
# write by Yufc
# 检查是否提供了目录作为参数
# Check if directory is provided as parameter
if [ "$#" -ne 1 ]; then
echo "Usage: $0 <directory>"
exit 1
fi
# 获取目录参数
# Get directory parameters
directory=$1
# 检查目录是否存在
# Check if directory exists
if [ ! -d "$directory" ]; then
echo "Error: Directory does not exist."
exit 1
fi
# 为目录及其子目录下的所有文件和文件夹增加读权限
# Add permissions to all files and folders in the directory and its subdirectories
find "$directory" -type d -exec chmod a+rwx {} \;
find "$directory" -type f -exec chmod a+rwx {} \;
echo "ALL permissions have been added to all files and directories within $directory."
```

运行脚本 `./ChMod.sh ./*`
run script: `./ChMod.sh ./wwwroot`

**3. 部署服务**
**3. Deploy service**

```bash
docker build -t nginx-homepage .
docker run -d -p 8080:80 nginx-homepage
```

**部署后访问服务器8080端口即可。**
**After deployment, just access the server port 8080.**
Binary file added assets/add-product.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/admin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/chat-notice.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/dark-mode.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/forget-password.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/home.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/login.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/otp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/product-class.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/setting.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/single-product.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/structure.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/wishlist.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit b227591

Please sign in to comment.