Browse Source

add the shell build script

pull/224/head
cKey 5 years ago
parent
commit
d0dc02c7cd
  1. 55
      build/build-aspnetcore-release.sh
  2. 21
      build/build-vue-element-admin.sh

55
build/build-aspnetcore-release.sh

@ -0,0 +1,55 @@
readonly workdir=$(cd $(dirname $0); pwd)
echo "当前工作目录: $workdir"
echo "构建身份认证服务"
cd $workdir"/../aspnet-core/services/account/AuthServer.Host"
dotnet restore
dotnet publish -c Release -o ../../Publish/identityserver --no-cache --no-restore
cp -r -f Dockerfile ../../Publish/identityserver/Dockerfile
echo "开始构建身份认证管理服务"
cd $workdir"/../aspnet-core/services/identity-server/LINGYUN.Abp.IdentityServer4.HttpApi.Host"
dotnet restore
dotnet publish -c Release -o ../../Publish/identityserver4-admin --no-cache --no-restore
cp -r -f Dockerfile ../../Publish/identityserver4-admin/Dockerfile
echo "开始构建后台管理服务"
cd $workdir"/../aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host"
dotnet restore
dotnet publish -c Release -o ../../Publish/admin --no-cache --no-restore
cp -r -f Dockerfile ../../Publish/admin/Dockerfile
echo "开始构建平台管理服务"
cd $workdir"/../aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host"
dotnet restore
dotnet publish -c Release -o ../../Publish/platform --no-cache --no-restore
cp -r -f Dockerfile ../../Publish/platform/Dockerfile
echo "开始构建消息管理服务"
cd $workdir"/../aspnet-core/services/messages/LINGYUN.Abp.MessageService.HttpApi.Host"
dotnet restore
dotnet publish -c Release -o ../../Publish/messages --no-cache --no-restore
cp -r -f Dockerfile ../../Publish/messages/Dockerfile
echo "开始构建网关管理服务"
cd $workdir"/../aspnet-core/services/apigateway/LINGYUN.ApiGateway.HttpApi.Host"
dotnet restore
dotnet publish -c Release -o ../../Publish/apigateway-admin --no-cache --no-restore
cp -r -f Dockerfile ../../Publish/apigateway-admin/Dockerfile
echo "开始构建网关服务"
cd $workdir"/../aspnet-core/services/apigateway/LINGYUN.ApiGateway.Host"
dotnet restore
dotnet publish -c Release -o ../../Publish/apigateway-host --no-cache --no-restore
cp -r -f Dockerfile ../../Publish/apigateway-host/Dockerfile

21
build/build-vue-element-admin.sh

@ -0,0 +1,21 @@
readonly workdir=$(cd $(dirname $0); pwd)
echo "当前工作目录: $workdir"
echo "开始构建前端UI应用界面"
cd $workdir"/../vueJs"
rm -rf $workdir"dist/*"
npm install --registry=http://registry.npm.taobao.org
npm run build:prod
rm -rf $workdir"/../aspnet-core/services/Publish/client"
mkdir -p $workdir"/../aspnet-core/services/Publish/client/docker/nginx"
cp -r -f $workdir/"/../vueJs/dist" $workdir"/../aspnet-core/services/Publish/client/dist"
cp -r -f $workdir/"/../vueJs/docker/nginx/nginx.conf" $workdir"/../aspnet-core/services/Publish/client/docker/nginx/nginx.conf"
cp -r -f $workdir/"/../vueJs/docker/nginx/default.conf" $workdir"/../aspnet-core/services/Publish/client/docker/nginx/default.conf"
cp -r -f $workdir/"/../vueJs/Dockerfile" $workdir"/../aspnet-core/services/Publish/client/Dockerfile"
Loading…
Cancel
Save