更新项目文件结构,统一文档风格
This commit is contained in:
@@ -70,26 +70,26 @@ FLUSH PRIVILEGES;
|
||||
```bash
|
||||
# 克隆代码
|
||||
git clone [repository_url] /opt/xlxumu
|
||||
cd /opt/xlxumu/backend/api
|
||||
cd /opt/xlxumu/backend-java
|
||||
|
||||
# 安装依赖
|
||||
npm install
|
||||
# 构建项目
|
||||
mvn clean package
|
||||
|
||||
# 配置环境变量
|
||||
cp .env.example .env
|
||||
# 编辑.env文件,配置数据库连接等信息
|
||||
cp services/farming-service/src/main/resources/application.yml.example services/farming-service/src/main/resources/application.yml
|
||||
# 编辑application.yml文件,配置数据库连接等信息
|
||||
|
||||
# 启动服务
|
||||
npm start
|
||||
java -jar services/farming-service/target/farming-service.jar
|
||||
```
|
||||
|
||||
### 3. 前端应用部署
|
||||
```bash
|
||||
# 构建各个前端应用
|
||||
cd /opt/xlxumu/frontend/website
|
||||
cd /opt/xlxumu/frontend/official-website
|
||||
# 构建静态网站
|
||||
|
||||
cd /opt/xlxumu/frontend/farming-management
|
||||
cd /opt/xlxumu/frontend/admin-system
|
||||
npm install
|
||||
npm run build
|
||||
|
||||
@@ -104,7 +104,7 @@ server {
|
||||
|
||||
# 静态网站
|
||||
location / {
|
||||
root /opt/xlxumu/frontend/website/dist;
|
||||
root /opt/xlxumu/frontend/official-website/dist;
|
||||
index index.html;
|
||||
try_files $uri $uri/ =404;
|
||||
}
|
||||
@@ -119,7 +119,7 @@ server {
|
||||
|
||||
# 各个管理系统
|
||||
location /farming-management/ {
|
||||
alias /opt/xlxumu/frontend/farming-management/dist/;
|
||||
alias /opt/xlxumu/frontend/admin-system/dist/;
|
||||
try_files $uri $uri/ /farming-management/index.html;
|
||||
}
|
||||
|
||||
@@ -146,7 +146,7 @@ services:
|
||||
- "3306:3306"
|
||||
|
||||
api:
|
||||
build: ./backend/api
|
||||
build: ./backend-java/services/farming-service
|
||||
ports:
|
||||
- "8000:8000"
|
||||
environment:
|
||||
|
||||
Reference in New Issue
Block a user