feat:修改mixspace

This commit is contained in:
okxlin 2024-03-14 17:10:56 +08:00
parent 193b4b8edc
commit b865402b10
8 changed files with 192 additions and 37 deletions

View File

@ -0,0 +1,8 @@
CONTAINER_NAME="mixspace"
PANEL_APP_PORT_HTTP="40203"
ALLOWED_ORIGINS="example.com"
ENCRYPT_ENABLE="false"
ENCRYPT_KEY=""
JWT_SECRET="Np2qgqtiUayA857a_2KpAwe"
TIME_ZONE="Asia/Shanghai"
SUBNET_PREFIX="172.19.0"

View File

@ -1,37 +1,54 @@
additionalProperties:
formFields:
- default: 2333
- default: 40203
edit: true
envKey: PANEL_APP_PORT_HTTP
labelEn: Port
labelZh: 应用端口
labelZh: 端口
required: true
rule: paramPort
type: number
- default: example.com
edit: true
envKey: ALLOWED_ORIGINS
labelEn: Allowed_Origins
labelZh: 允许域名前端绑定域名不需要https://,多个使用英文逗号分割)
labelEn: Allowed domain (multiple delimited with ",")
labelZh: 被允许的域名 (多个使用英文逗号分割)
required: true
type: text
- default: Np2qgqtiUayA857
- default: Np2qgqtiUayA857a
edit: true
envKey: JWT_SECRET
labelEn: Password
labelZh: JWT密钥16到32位字符请一定修改至要求
labelEn: JWT key (16 to 32 characters)
labelZh: JWT 密钥 (16 到 32 位字符)
random: true
required: true
rule: paramComplexity
type: password
- default:
- default: ''
edit: true
envKey: ENCRYPT_KEY
labelEn: ENCRYPT_KEY
labelZh: 加密密钥(非特殊需求不建议填写)
labelEn: Encryption key (not recommended for non-special needs, run "openssl rand -hex 32" on the terminal to obtain it)
labelZh: 加密密钥 (非特殊需求不建议填写,终端执行 "openssl rand -hex 32" 获取)
required: false
rule: paramCommon
type: password
- default:
type: text
- default: "false"
edit: true
envKey: ENCRYPT_ENABLE
labelEn: ENCRYPT_ENABLE
labelZh: 是否开启加密true或false需要填写加密密钥
required: false
type: text
labelEn: Whether to enable encryption (true or false, if you want to enable it, you need to enter the encryption key)
labelZh: 是否开启加密 (true或false,开启则需要填写加密密钥)
required: true
type: text
- default: Asia/Shanghai
edit: true
envKey: TIME_ZONE
labelEn: Time zone
labelZh: 时区
required: true
type: text
- default: 172.19.0
edit: true
envKey: SUBNET_PREFIX
labelEn: New docker network subnet prefix
labelZh: 新 docker 网络子网前缀
required: true
type: text

View File

@ -1,12 +1,11 @@
version: '3.8'
services:
app:
mixspace:
container_name: ${CONTAINER_NAME}
image: innei/mx-server:5
command: bash ./docker-run.sh
environment:
- TZ=Asia/Shanghai
- TZ=${TIME_ZONE}
- NODE_ENV=production
- ALLOWED_ORIGINS=${ALLOWED_ORIGINS}
- JWT_SECRET=${JWT_SECRET}
@ -16,14 +15,8 @@ services:
- ./data/mx-space:/root/.mx-space
ports:
- '${PANEL_APP_PORT_HTTP}:2333'
depends_on:
- mongo
- redis
links:
- mongo
- redis
networks:
- 1panel-network
- mixspace-network
restart: always
healthcheck:
test: ['CMD', 'curl', '-f', 'http://127.0.0.1:2333/api/v2/ping']
@ -31,25 +24,39 @@ services:
timeout: 30s
retries: 5
start_period: 30s
depends_on:
- mongo
- redis
links:
- mongo
- redis
labels:
createdBy: "Apps"
mongo:
container_name: mongo
container_name: ${CONTAINER_NAME}-mongo
image: mongo
volumes:
- ./data/db:/data/db
networks:
- 1panel-network
- mixspace-network
restart: always
labels:
createdBy: "Apps"
redis:
image: redis
container_name: redis
container_name: ${CONTAINER_NAME}-redis
networks:
- 1panel-network
- mixspace-network
restart: always
networks:
1panel-network:
external: true
labels:
createdBy: "Apps"
networks:
mixspace-network:
driver: bridge
ipam:
driver: default
config:
- subnet: ${SUBNET_PREFIX}.0/16

View File

@ -4,8 +4,7 @@ Mix Space 是一个一款简洁而不简单的个人博客系统,它够快,
## 注意事项
在此处你安装的是Mix-Space的后端你还需要参照官方文档中的[前端主题](https://mx-space.js.org/themes
)部分完成前端部署
在此处你安装的是Mix-Space的后端你还需要参照官方文档中的 [前端主题](https://mx-space.js.org/themes) 部分完成前端部署
## 主要功能:

View File

@ -0,0 +1,8 @@
CONTAINER_NAME="mixspace"
PANEL_APP_PORT_HTTP="40203"
ALLOWED_ORIGINS="example.com"
ENCRYPT_ENABLE="false"
ENCRYPT_KEY=""
JWT_SECRET="Np2qgqtiUayA857a_2KpAwe"
TIME_ZONE="Asia/Shanghai"
SUBNET_PREFIX="172.19.0"

View File

@ -0,0 +1,54 @@
additionalProperties:
formFields:
- default: 40203
edit: true
envKey: PANEL_APP_PORT_HTTP
labelEn: Port
labelZh: 端口
required: true
rule: paramPort
type: number
- default: example.com
edit: true
envKey: ALLOWED_ORIGINS
labelEn: Allowed domain (multiple delimited with ",")
labelZh: 被允许的域名 (多个使用英文逗号分割)
required: true
type: text
- default: Np2qgqtiUayA857a
edit: true
envKey: JWT_SECRET
labelEn: JWT key (16 to 32 characters)
labelZh: JWT 密钥 (16 到 32 位字符)
random: true
required: true
rule: paramComplexity
type: password
- default: ''
edit: true
envKey: ENCRYPT_KEY
labelEn: Encryption key (not recommended for non-special needs, run "openssl rand -hex 32" on the terminal to obtain it)
labelZh: 加密密钥 (非特殊需求不建议填写,终端执行 "openssl rand -hex 32" 获取)
required: false
type: text
- default: "false"
edit: true
envKey: ENCRYPT_ENABLE
labelEn: Whether to enable encryption (true or false, if you want to enable it, you need to enter the encryption key)
labelZh: 是否开启加密 (true或false,开启则需要填写加密密钥)
required: true
type: text
- default: Asia/Shanghai
edit: true
envKey: TIME_ZONE
labelEn: Time zone
labelZh: 时区
required: true
type: text
- default: 172.19.0
edit: true
envKey: SUBNET_PREFIX
labelEn: New docker network subnet prefix
labelZh: 新 docker 网络子网前缀
required: true
type: text

View File

@ -0,0 +1,62 @@
version: '3.8'
services:
mixspace:
container_name: ${CONTAINER_NAME}
image: innei/mx-server:latest
command: bash ./docker-run.sh
environment:
- TZ=${TIME_ZONE}
- NODE_ENV=production
- ALLOWED_ORIGINS=${ALLOWED_ORIGINS}
- JWT_SECRET=${JWT_SECRET}
- ENCRYPT_KEY=${ENCRYPT_KEY}
- ENCRYPT_ENABLE=${ENCRYPT_ENABLE}
volumes:
- ./data/mx-space:/root/.mx-space
ports:
- '${PANEL_APP_PORT_HTTP}:2333'
networks:
- mixspace-network
restart: always
healthcheck:
test: ['CMD', 'curl', '-f', 'http://127.0.0.1:2333/api/v2/ping']
interval: 1m30s
timeout: 30s
retries: 5
start_period: 30s
depends_on:
- mongo
- redis
links:
- mongo
- redis
labels:
createdBy: "Apps"
mongo:
container_name: ${CONTAINER_NAME}-mongo
image: mongo
volumes:
- ./data/db:/data/db
networks:
- mixspace-network
restart: always
labels:
createdBy: "Apps"
redis:
image: redis
container_name: ${CONTAINER_NAME}-redis
networks:
- mixspace-network
restart: always
labels:
createdBy: "Apps"
networks:
mixspace-network:
driver: bridge
ipam:
driver: default
config:
- subnet: ${SUBNET_PREFIX}.0/16

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.2 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB