Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwplvx
Aurora
提交
58a641d7
Aurora
项目概览
lwplvx
/
Aurora
通知
7
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Aurora
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
58a641d7
编写于
7月 06, 2021
作者:
lwplvx
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
scripts run.py ok support startup port
上级
19f2a5f7
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
37 addition
and
20 deletion
+37
-20
Aurora.Microservices/Aurora.Tenant/Aurora.Tenant.Api/Controllers/TenantController.cs
....Tenant/Aurora.Tenant.Api/Controllers/TenantController.cs
+10
-10
Scripts/Deploy/run.py
Scripts/Deploy/run.py
+27
-10
未找到文件。
Aurora.Microservices/Aurora.Tenant/Aurora.Tenant.Api/Controllers/TenantController.cs
浏览文件 @
58a641d7
...
...
@@ -46,16 +46,16 @@ namespace Aurora.Tenant.Api.Controllers
return
res
;
}
[
HttpGet
]
/// <summary>
/// get tenant by current request url
/// </summary>
/// <returns></returns>
public
async
Task
<
ResponseModel
<
TenantUserDto
>>
GetByUrl
(
string
url
)
{
var
res
=
await
_tenantService
.
GetById
(
id
);
return
res
;
}
//
[HttpGet]
//
//
/ <summary>
//
//
/ get tenant by current request url
//
//
/ </summary>
//
//
/ <returns></returns>
//
public async Task<ResponseModel<TenantUserDto>> GetByUrl(string url)
//
{
// var res = await _tenantService.get(url
);
//
return res;
//
}
[
HttpPost
]
/// <summary>
...
...
Scripts/Deploy/run.py
浏览文件 @
58a641d7
...
...
@@ -36,9 +36,21 @@ def poutput(name, pid): # 定义函数名
f
.
write
(
pid
+
'
\n
'
)
# 加\n换行显示
def
start_dotnetservice
(
name
,
runPath
):
start_service
(
name
,
'dotnet run --project {}'
.
format
(
os
.
path
.
join
(
runPath
,
name
,
name
+
'.csproj'
)))
# dotnet Aurora.Gateway.dll --urls "http://*:6002"
# dotnet build E:\Workspace\aurora\Aurora.Gateway\Aurora.Gateway.csproj ;cd E:\Workspace\aurora\Aurora.Gateway\bin\Debug\net5.0;dotnet Aurora.Gateway.dll
def
start_dotnetservice
(
name
,
runPath
,
port
):
projectPath
=
os
.
path
.
join
(
runPath
,
name
)
dllPath
=
os
.
path
.
join
(
projectPath
,
r
'bin\Debug\net5.0'
)
subprocess
.
run
(
'dotnet build'
,
shell
=
True
,
cwd
=
projectPath
)
subprocess
.
Popen
(
'dotnet {}.dll --urls "http://*:{}"'
.
format
(
name
,
port
),
shell
=
True
,
cwd
=
dllPath
)
# start_service(
# name, 'dotnet build {}; dotnet {}.dll'.format(projectPath, dllPath))
# start_service(
# name, 'cd {0}; dotnet build; cd {1}; dotnet {2}.dll'.format(projectPath, dllPath, name))
# start_service(
# name, 'cd {};dotnet publish -o bin/Publish;cd bin/Publish;run {}.dll'.format(runPath, name))
...
...
@@ -46,16 +58,16 @@ def start_dotnetservice(name, runPath):
def
start_service
(
name
,
cmd
):
print
(
'启动 '
+
name
)
print
(
'run cmd -> '
+
cmd
)
ret
=
subprocess
.
Popen
(
cmd
)
# ret = subprocess.Popen(cmd)
ret
=
subprocess
.
Popen
(
cmd
,
shell
=
True
)
# 记录下 pid
poutput
(
pid_output
,
"service {},pid {}"
.
format
(
name
,
str
(
ret
.
pid
)))
clear_poutput
(
pid_output
)
print
(
'启动 Consul'
)
start_service
(
'Consul'
,
'consul agent -dev'
)
#
start_service('Consul', 'consul agent -dev')
# d = os.system('consul agent -dev')
# d = os.popen('consul agent -dev')
...
...
@@ -66,23 +78,28 @@ start_service('Consul', 'consul agent -dev')
# Gateway
s_name
=
'Aurora.Gateway'
runPath
=
os
.
path
.
join
(
work_space
)
start_dotnetservice
(
s_name
,
runPath
)
start_dotnetservice
(
s_name
,
runPath
,
5000
)
# Tenant
s_name
=
'Aurora.Tenant.Api'
runPath
=
os
.
path
.
join
(
work_space
,
'Aurora.Microservices'
,
'Aurora.Tenant'
)
start_dotnetservice
(
s_name
,
runPath
)
start_dotnetservice
(
s_name
,
runPath
,
6000
)
# Auth
s_name
=
'Aurora.Auth'
runPath
=
os
.
path
.
join
(
work_space
)
start_dotnetservice
(
s_name
,
runPath
,
7000
)
# Core.Api
s_name
=
'Aurora.Core.Api'
runPath
=
os
.
path
.
join
(
work_space
,
'Aurora.Microservices'
,
'Aurora.Core'
)
start_dotnetservice
(
s_name
,
runPath
)
start_dotnetservice
(
s_name
,
runPath
,
8000
)
# WebHost
s_name
=
'Aurora.WebHost'
runPath
=
os
.
path
.
join
(
work_space
)
start_dotnetservice
(
s_name
,
runPath
)
start_dotnetservice
(
s_name
,
runPath
,
9000
)
iStr
=
input
(
'输入任意字符以结束……'
)
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录