|
|
@ -1,38 +1,40 @@ |
|
|
|
## 代码结构 |
|
|
|
|
|
|
|
|
|
|
|
-- im2latex_master OCR模型 |
|
|
|
|
|
|
|
--php,js文件 |
|
|
|
|
|
|
|
Dockerfile |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## 部署运行方式: |
|
|
|
|
|
|
|
方式一:直接用docker部署 |
|
|
|
|
|
|
|
1. 申请ucloud云主机 |
|
|
|
|
|
|
|
2. 在云主机上使用容器部署ngnix,php,python环境 |
|
|
|
|
|
|
|
```shell |
|
|
|
docker build -t wangziyue/php-ngnix-python . |
|
|
|
docker run -d --rm -v /var/app2/:/app/ -p 80:80 --privileged=true --name php-nginx-python wangziyue/php-ngnix-python:v2 |
|
|
|
|
|
|
|
``` |
|
|
|
|
|
|
|
3. 申请ucloud的云数据库,修改pdo.php中数据库地址 |
|
|
|
4. 在云数据库中运行init.sql |
|
|
|
5. 访问 id:/index.php |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## SaaS应用效果截图: |
|
|
|
|
|
|
|
GRANT ALL ON blog.* TO 'root'@'%' IDENTIFIED BY 'a15862340183'; |
|
|
|
CREATE DATABASE blog DEFAULT CHARACTER SET utf8; |
|
|
|
CREATE TABLE users ( |
|
|
|
user_id INT UNSIGNED NOT NULL AUTO_INCREMENT , |
|
|
|
|
|
|
|
password VARCHAR(128) NOT NULL , |
|
|
|
name VARCHAR(255) NOT NULL , |
|
|
|
PRIMARY KEY(user_id) |
|
|
|
)ENGINE=InnoDB DEFAULT CHARSET=utf8; |
|
|
|
|
|
|
|
CREATE TABLE article ( |
|
|
|
article_id INT UNSIGNED NOT NULL AUTO_INCREMENT , |
|
|
|
user_id INT UNSIGNED NOT NULL, |
|
|
|
headline TEXT, |
|
|
|
content TEXT, |
|
|
|
viewer INT UNSIGNED , |
|
|
|
public varchar(11), |
|
|
|
category varchar(128), |
|
|
|
PRIMARY KEY(article_id), |
|
|
|
|
|
|
|
CONSTRAINT articc_ibfk_1 |
|
|
|
FOREIGN KEY (user_id) |
|
|
|
REFERENCES users (user_id) |
|
|
|
ON DELETE CASCADE ON UPDATE CASCADE |
|
|
|
)ENGINE=InnoDB DEFAULT CHARSET=utf8; |
|
|
|
|
|
|
|
CREATE TABLE commentsss ( |
|
|
|
id INT UNSIGNED NOT NULL AUTO_INCREMENT , |
|
|
|
comment_id INT UNSIGNED NOT NULL, |
|
|
|
feedback_id INT UNSIGNED , |
|
|
|
name VARCHAR(128), |
|
|
|
user_id INTEGER, |
|
|
|
article_id INT UNSIGNED, |
|
|
|
content TEXT, |
|
|
|
PRIMARY KEY(id), |
|
|
|
CONSTRAINT articcc_ibfk_1 |
|
|
|
FOREIGN KEY (article_id) |
|
|
|
REFERENCES article (article_id) |
|
|
|
ON DELETE CASCADE ON UPDATE CASCADE |
|
|
|
)ENGINE=InnoDB DEFAULT CHARSET=utf8; |