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 <CONTAINERID>#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.**