From 667310dd4b796aaf33d2295e7e6a26cf42c0f81c Mon Sep 17 00:00:00 2001 From: Wang Yuyang Date: Mon, 29 Nov 2021 18:55:00 +0800 Subject: [PATCH] update-readme.md --- README.md | 128 ++++-------------------------------------------------- 1 file changed, 9 insertions(+), 119 deletions(-) diff --git a/README.md b/README.md index 8594d84..91269ec 100644 --- a/README.md +++ b/README.md @@ -2,124 +2,30 @@ ## **1. Introduction** This project is a special forum for the communication of students, called **Student Exchange Forum of BJUT**. +## 2. Deployment +### 1. Docker - -## **2. Deployment** - -### 2. 1 Run with Docker - -**You can download the docker image we have prepared from Docker Hub, or you can generate a new docker image based on the Dockerfile inside the code.** - -> The premise of using docker is that your computer has docker - -#### 2.1.1 Download Docker Image - -* Download - -```shell -docker pull hanhaozhi/sep_team16 -``` - -* Run - -```shell -docker run -d -p 5000:5000 hanhaozhi/sep_team16 -``` - -#### 2.1.2 Generate a new Docker Image - -* Generate +Pull the docker image: ```shell -docker build -t team16:latest . +docker push echo0821/web-methodology ``` -* Run +Start this docker image: ```shell -docker run -d -p 5000:5000 team16:latest +docker run -p 5000:5000 echo0821/web-methodology ``` -#### 2.1.3 Open - -* Open Web APP +### 2. kubernetes -```shell -# If your computer is mac you can use this. -open -a "Google Chrome" http://127.0.0.1:5000/ -# If your computer is windows you can use this. -You can visit directly in the browser: 127.0.0.1:5000 to view. -``` - -* Kill Run - -```shell -docker ps #View the CONTAINER ID of the running container -``` +Apply the config: ```shell -docker kill #Stop run +kubctl apply -f k8s/web-methodology.yaml ``` - -### 2.2 Run with Virtualenv Environment - -**Please use PyCharm as much as possible for the entire project, which can simplify the process of environment configuration.** - -#### **2.2.1 Clone project to local** - -```shell -git clone https://csgitlab.ucd.ie/18206155/debugger.git -``` - -#### 2.2.2 Configure Python interpreter - -You'll need to find Project Interpreter in Preferences of PyCharm to create a new Virtualenv Environment. - -> This is a brand new virtual environment and will not be affected by other environments in your computer. - -#### 2.2.3 Install all the packages - -```shell -pip install -r requirements.txt -``` -#### 2.2.4 Run codes - -* For Linux and macOS, - -```shell script -export FLASK_APP=flasky.py -flask run -``` - -* For Windows - -```shell script -set FLASK_APP=flasky.py -flask run -``` - -#### 2.2.5 Problem that may arise - -**In the process of using pip to download the package, we have various problems. You can refer to these following information.** - -1. If the terminal prompts "Requirement already satisfied: ..." but it cannot find the package we originally installed when running. -* Solution: We need to clear the cache data of PyCharm and reinstall all the packages we need through the "requirements.txt" file. -* And How to Clear the Cache Data: - - -2. Internet speed is too slow resulting in download failure. -* Solution:Download via douban source. -* Reference: - -3. After excluding the above problems, still cannot install any packet. -* Error info: Cannot connect to proxy solution: -* Solution: It may be caused by a proxy server set on the computer. Just shut off the proxy the sever. -* Reference: - - - ## 3. Test ### 3.1 Student Account @@ -179,19 +85,3 @@ Here is an organization account for you to test. | -------------- | -------- | | 99999999 | password | - - -## **4.** **About Group 16** - -### **4.1 Group Name** -**Debugger** - -### **4.2 Group Members** - -| UCD Student Numbers | BJUT Student Numbers | Name | Email | 中文名字 | -| :-----------------: | :------------------: | :--------: | :----------------------: | :------: | -| 18206155 | 18372216 | Han Haozhi | haozhi.han@ucdconnect.ie | 韩昊知 | -| 18206178 | 18372315 | Yang Qifan | qifan.yang@ucdconnect.ie | 杨其帆 | -| 18206187 | 18372330 | Yang Xiao | xiao.yang1@ucdconnect.ie | 杨骁 | -| 18206184 | 18372326 | Ou Liwei | liwei.ou@ucdconnect.ie | 欧立炜 | -| 18206366 | 18372314 | Cai Songge | songge.cai@ucdconnect.ie | 蔡颂歌 |