11# Docker 部署
22
3-
4- import { Card , Cards , Callout , Steps } from ' nextra/components' ;
5- import { UilExternalLinkAlt } from ' @components/Icons/ExternalLinkAlt' ;
6- import { UilArrowCircleUp } from ' @components/Icons/ArrowCircleUp' ;
3+ import { Card , Cards , Callout , Steps } from ' nextra/components'
4+ import { UilExternalLinkAlt } from ' @components/Icons/ExternalLinkAlt'
5+ import { UilArrowCircleUp } from ' @components/Icons/ArrowCircleUp'
76
87<Steps >
98### 安装 Docker
@@ -13,6 +12,7 @@ import { UilArrowCircleUp } from '@components/Icons/ArrowCircleUp';
1312``` bash
1413curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun
1514```
15+
1616在国外,可以直接使用官方脚本安装:
1717
1818``` bash
@@ -27,7 +27,6 @@ docker -v
2727docker compose version
2828```
2929
30-
3130### 拉取配置文件
3231
3332``` bash
@@ -43,38 +42,37 @@ wget https://fastly.jsdelivr.net/gh/mx-space/core@master/docker-compose.yml
4342
4443> 鼠标悬停在下方的表格中,可以查看对应的配置项名字。
4544
46- import { EnvVariableConfig } from ' @components/EnvVariableConfig' ;
47-
48- <EnvVariableConfig
49- variableNames = {
50- [
51- {
52- key: ' JWT_SECRET' ,
53- name: " [JWT 密钥] 长度不小于 16 个字符,不大于 32 个字符" ,
54- },
55- {
56- key: ' ALLOWED_ORIGINS' ,
57- name: " [被允许的域名] 如果允许多个域名访问,用英文逗号,分隔" ,
58- },
59- {
60- key: ' ENCRYPT_ENABLE' ,
61- name: " [是否开启加密] true 为开启,false 为关闭" ,
62- },
63- {
64- key: ' ENCRYPT_KEY' ,
65- name: " [加密密钥] 详情请见下方提示" ,
66- },
67- ]
68- }
45+ import { EnvVariableConfig } from ' @components/EnvVariableConfig'
46+
47+ <EnvVariableConfig
48+ variableNames = { [
49+ {
50+ key: ' JWT_SECRET' ,
51+ name: ' [JWT 密钥] 长度不小于 16 个字符,不大于 32 个字符' ,
52+ },
53+ {
54+ key: ' ALLOWED_ORIGINS' ,
55+ name: ' [被允许的域名] 如果允许多个域名访问,用英文逗号,分隔' ,
56+ },
57+ {
58+ key: ' ENCRYPT_ENABLE' ,
59+ name: ' [是否开启加密] true 为开启,false 为关闭' ,
60+ },
61+ {
62+ key: ' ENCRYPT_KEY' ,
63+ name: ' [加密密钥] 详情请见下方提示' ,
64+ },
65+ ]}
6966/>
7067
7168- ** ` JWT 密钥 ` ** :需要填写长度不小于 16 个字符,不大于 32 个字符的字符串,用于加密用户的 JWT,务必保存好自己的密钥,不要泄露给他人。
7269- ** ` 被允许的域名 ` ** :需要填写被允许的域名,通常是前端的域名,如果允许多个域名访问,用英文逗号,分隔。
7370- ** ` 是否开启加密 ` ** :如果你确定要开启加密,将 false 改为 true,开启加密后,你需要在下方填写加密密钥。
74- - ** ` 加密密钥 ` ** :具体内容可参考 https://mx-space.js.org/feature /security.html
71+ - ** ` 加密密钥 ` ** :如果你不知道这是什么,那么不建议开启此功能, 具体内容可参考 https://mx-space.js.org/usage /security.html
7572
7673<Callout type = " warning" >
77- 若开启加密,则需注意密钥长度** 必须为 64 位** ,不然会在初始化时报错。注意这是** 不可逆** 的,务必保存自己的秘钥。所以并不是非常推荐使用,除非你真的需要加密,
74+ 若开启加密,则需注意密钥长度** 必须为 64
75+ 位** ,不然会在初始化时报错。注意这是** 不可逆** 的,务必保存自己的秘钥。所以并不是非常推荐使用,除非你真的需要加密,
7876</Callout >
7977
8078### 启动 Core
@@ -92,11 +90,17 @@ docker compose up -d
9290## 相关链接
9391
9492<Cards num = { 2 } >
95- <Card arrow title = " 反向代理配置" href = " /docs/extra#反向代理" icon = { <UilExternalLinkAlt />} />
96- <Card arrow title = " 前端主题部署" href = " /themes" icon = { <UilExternalLinkAlt />} />
93+ <Card
94+ arrow
95+ title = " 反向代理配置"
96+ href = " /docs/extra#反向代理"
97+ icon = { <UilExternalLinkAlt />}
98+ />
99+ <Card
100+ arrow
101+ title = " 前端主题部署"
102+ href = " /themes"
103+ icon = { <UilExternalLinkAlt />}
104+ />
97105 <Card arrow title = " 使用指南" href = " /usage" icon = { <UilArrowCircleUp />} />
98106</Cards >
99-
100-
101-
102-
0 commit comments