更新部署文档

This commit is contained in:
Himit_ZH 2021-05-12 23:41:30 +08:00
parent 67da4bd53a
commit 2b954aa3d0
3 changed files with 44 additions and 23 deletions

View File

@ -20,13 +20,11 @@
```shell
//mysql配置文件
mkdir -p /data/mysql/conf
mkdir -p /hoj/data/mysql/conf
//mysql数据文件路径
mkdir p /data/mysql/data
//日志文件路径
mkdir -p /data/mysql/logs
mkdir p /hoj/data/mysql/data
```
4. 启动mysql
```shell
@ -35,13 +33,12 @@
--network hoj-network \
--ip 172.18.0.4 \
--restart="always" \
-v /data/mysql/conf.d:/etc/mysql/conf.d \
-v /data/mysql/logs:/logs \
-v /data/mysql/data:/data \
-v /hoj/data/mysql/conf.d:/etc/mysql/conf.d \
-v /hoj/data/mysql/data:/var/lib/mysql \
-e MYSQL_ROOT_PASSWORD="123456" \
mysql:5.7
```
5. 启动成功后 使用docker ps 可查看 如果正常则进行数据库创建操作
6. 创建名字叫hoj的数据库执行脚本在sqlAndSetting文件夹里面或者 [hoj.sql](https://gitee.com/himitzh0730/hoj/blob/master/sqlAndsetting/hoj.sql)、[hoj-data.sql](https://gitee.com/himitzh0730/hoj/blob/master/sqlAndsetting/hoj-data.sql)

View File

@ -6,7 +6,7 @@
<div slot="header">
<span class="panel-title home-title">Compiler & Example</span>
</div>
<div class="content markdown-body">
<div class="content">
<ul>
<li v-for="lang in languages" :key="lang.name">
{{ lang.name }} ( {{ lang.description }} )
@ -107,6 +107,7 @@
import utils from '@/common/utils';
import Highlight from '@/components/oj/common/Highlight';
import { JUDGE_STATUS } from '@/common/constants';
import { addCodeBtn } from '@/common/codeblock';
export default {
components: {
Highlight,
@ -131,6 +132,15 @@ export default {
});
});
},
watch: {
languages(newVal, oldVal) {
if (newVal.length > 0) {
this.$nextTick((_) => {
addCodeBtn();
});
}
},
},
};
</script>
@ -142,6 +152,14 @@ export default {
font-size: 16px;
margin: 0 50px 20px 50px;
}
.container .content pre {
padding: 5px 10px;
white-space: pre-wrap;
margin-top: 15px;
margin-bottom: 15px;
background: #f8f8f9;
border: 1px dashed #e9eaec;
}
@media screen and (max-width: 768px) {
.container .content {
font-size: 1rem;

View File

@ -11,19 +11,19 @@
<span v-if="contestID && !contestEnded"
><el-tag effect="plain" size="small">比赛题目</el-tag></span
>
<span v-else-if="problemData.tags.length > 0"
><el-tag
<div v-else-if="problemData.tags.length > 0" class="problem-tag">
<el-tag
v-for="tag in problemData.tags"
:key="tag"
effect="plain"
size="small"
style="margin-right:10px;"
>{{ tag }}</el-tag
></span
>
<span v-else-if="problemData.tags.length == 0"
><el-tag effect="plain" size="small">暂无标签</el-tag></span
>
>
</div>
<div v-else-if="problemData.tags.length == 0" class="problem-tag">
<el-tag effect="plain" size="small">暂无标签</el-tag>
</div>
<div class="problem-menu">
<span v-if="!contestID">
<el-link
@ -49,7 +49,7 @@
:underline="false"
@click="goProblemSubmission"
><i class="fa fa-bars" aria-hidden="true"></i>
Submission</el-link
Solution</el-link
></span
>
</div>
@ -831,13 +831,13 @@ export default {
flex: auto;
}
.problem-menu {
float: right;
float: left;
}
a {
color: #3091f2 !important ;
}
.problem-menu span {
margin-left: 10px;
margin-left: 5px;
}
.el-link {
font-size: 16px !important;
@ -867,8 +867,14 @@ a {
height: 700px !important;
overflow-y: auto;
}
.problem-tag {
display: inline;
}
.problem-menu {
float: right;
}
.problem-menu span {
margin-left: 20px;
margin-left: 10px;
}
.question-intr {
margin-top: 6px;
@ -896,8 +902,8 @@ a {
margin-top: -50px;
}
#problem-content .title {
font-size: 20px;
font-weight: 400;
font-size: 16px;
font-weight: 600;
margin: 25px 0 8px 0;
color: #3091f2;
}