# 1、准备公网上的测试数据库。

之前我们在Visual Studio里面调试的时候,使用的都是localhost的数据库。现在需要在公网上准备一个SQL Server。然后执行下面的步骤

1)把Study.BlazorOne.DbMigrator设置为启动项目;

2)修改appsettings.json中的连接字符串

将本地localhost的配置注释掉,加上公网的连接字符串

3)运行DbMigrator

# 2、为Study.BlazorOne.Blazor项目启用Dockers支持

# 3、在解决方案根目录下放置自动集成的配置文件

# 4、签入代码,尝试首次让gitlab的runner来构建Docker镜像

Gitlab中显示的完整信息如下

Running with gitlab-runner 15.11.0 (436955cb)
on gr05 YozfsKoh, system ID: r_QId06ioCL2oU
Preparing the "docker" executor 00:01
Using Docker executor with image proget.abcdefg.cn/gitlab/runner:7.0 ...
Authenticating with credentials from $DOCKER_AUTH_CONFIG
Pulling docker image proget.abcdefg.cn/gitlab/runner:7.0 ...
Using docker image sha256:79e3cb48a17b32ddebfbd69a5cee6f9f4cc0c9c3fb0dd669bd8bed8a6690de95 for proget.abcdefg.cn/gitlab/runner:7.0 with digest proget.loda.net.cn/gitlab/runner@sha256:a467584163ae036b191065de98fde78f378ef84ef06feef5be66f272e0b7504b ...
Preparing environment 00:01
Running on runner-yozfskoh-project-8-concurrent-0 via gr02...
Getting source from Git repository 00:01
Fetching changes with git depth set to 20...
Initialized empty Git repository in /builds/YozfsKoh/0/study/blazor-one/.git/
Created fresh repository.
Checking out 42f160af as detached HEAD (ref is main)...
Skipping Git submodules setup
Executing "step_script" stage of the job script 00:12
Using docker image sha256:79e3cb48a17b32ddebfbd69a5cee6f9f4cc0c9c3fb0dd669bd8bed8a6690de95 for proget.abcdefg.cn/gitlab/runner:7.0 with digest proget.abcdefg.cn/gitlab/runner@sha256:a467584163ae036b191065de98fde78f378ef84ef06feef5be66f272e0b7504b ...
$ docker login -u $DOCKER_DEV_USERNAME -p $DOCKER_DEV_PASSWORD $DOCKER_DEV_SERVER
WARNING! Using --password via the CLI is insecure. Use --password-stdin.
WARNING! Your password will be stored unencrypted in /root/.docker/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credentials-store
Login Succeeded
$ cd .
$ docker build -t $BLAZOR_DEV_REPO:$BLAZORONE_IMAGE_TAG -f src/Study.BlazorOne.Blazor/Dockerfile --no-cache .
Step 1/24 : FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS base
7.0: Pulling from dotnet/aspnet
Get "https://mcr.microsoft.com/v2/dotnet/aspnet/manifests/sha256:136deb59fc62f52d7d9dde928cdefeaa7b25ef72c4e8bc8c56e676c6b5d7ab53": net/http: TLS handshake timeout
Cleaning up project directory and file based variables 00:01
ERROR: Job failed: exit code 1

卡在了最后一步,就是从microsoft.com下载aspnet:7.0的基础镜像的时候,TLS握手超时。

简单,我们在自己的私有docker registry中放置这个aspnet:7.0的基础镜像即可。

然后修改Study.BlazorOne.Blazor项目的Dockerfile文件,改动第3行和第8行,指向我们修改过后的基础镜像:

签入代码。Gitlab的Runner立即尝试自动构建。

# 5、看起来顺利构建,但是还是卡在最后一步:

a0acdda47b2a: Retrying in 1 second
e2fed13a1ac3: Retrying in 1 second
03cef3692ade: Retrying in 1 second
39d424e26f18: Waiting
unknown: Could not resolve ProGet feed "study". Docker repository names in ProGet must include the feed as a prefix. Example: MyFeed/library/ubuntu
Cleaning up project directory and file based variables 00:01
ERROR: Job failed: exit code 1

这个错误的意思,是我们指定的路径是用于上传NuGet包的,不能用于推送Docker镜像。重新在ProGet里面创建新的Feed,用于储存Docker的构建的成果。然后修改.gitlab-ci.yml中的变量。修改了下图第9行的URL:

签入代码,Gitlab中立即调用了Runner,成功自动构建。

# 6、上图显示,自动集成任务的第一步,构建Docker镜像是成功了,第二步报错。

错误信息如下:

Running with gitlab-runner 15.11.0 (436955cb)
on gr05 YozfsKoh, system ID: r_QId06ioCL2oU
Preparing the "docker" executor 00:01
Using Docker executor with image proget.abcdefg.cn/gitlab/runner:7.0 ...
Authenticating with credentials from $DOCKER_AUTH_CONFIG
Pulling docker image proget.abcdefg.cn/gitlab/runner:7.0 ...
Using docker image sha256:79e3cb48a17b32ddebfbd69a5cee6f9f4cc0c9c3fb0dd669bd8bed8a6690de95 for proget.abcdefg.cn/gitlab/runner:7.0 with digest proget.abcdefg.cn/gitlab/runner@sha256:a467584163ae036b191065de98fde78f378ef84ef06feef5be66f272e0b7504b ...
Preparing environment 00:01
Running on runner-yozfskoh-project-8-concurrent-0 via gr02...
Getting source from Git repository 00:01
Fetching changes with git depth set to 20...
Reinitialized existing Git repository in /builds/YozfsKoh/0/study/blazor-one/.git/
Checking out 0087e923 as detached HEAD (ref is main)...
Skipping Git submodules setup
Restoring cache 00:00
Checking cache for default-protected...
No URL provided, cache will not be downloaded from shared cache server. Instead a local version of cache will be extracted.
Successfully extracted cache
Executing "step_script" stage of the job script 00:01
Using docker image sha256:79e3cb48a17b32ddebfbd69a5cee6f9f4cc0c9c3fb0dd669bd8bed8a6690de95 for proget.abcdefg.cn/gitlab/runner:7.0 with digest proget.abcdefg.cn/gitlab/runner@sha256:a467584163ae036b191065de98fde78f378ef84ef06feef5be66f272e0b7504b ...
$ mkdir -p ~/.ssh
$ chmod 700 ~/.ssh
$ cd /root/.ssh
$ cp /home/gitlab-runner/ssh/* .
$ echo "部署到Brain测试站……"
部署到Brain测试站……
$ cd /home/gitlab-runner/scripts
$ bash ssh-deploy.sh blazor_one_test 8606 80 $BLAZOR_DEV_REPO:$BLAZORONE_IMAGE_TAG amisoft $DOCKER_DEV_SERVER $DOCKER_DEV_USERNAME $DOCKER_DEV_PASSWORD $SSH_AUTO_LOGIN_USER $TEST_APP_SERVER
docker容器实例名称: blazor_one_test
目标服务器对外端口号 8606
docker容器开放端口号 80
docker镜像URL proget.abcdefg.cn/study-images/blazor:15
容器启动配置环境 amisoft
Docker服务器DNS名称 proget.abcdefg.cn
登入Docker服务器的用户名称 usernamexxxxx
登入Docker服务器的密码 myPassword
SSH自动登入目标服务器使用的用户名 username
SSH自动登入的目标服务器 proget.abcdefg.cn
在服务器上执行的命令是
docker run -d --privileged=true --restart=always -d --name blazor_one_test -v /mnt/data/yee-change:/var/config -e ASPNETCORE_ENVIRONMENT=amisoft -p 8606:80 proget.abcdefg.cn/study-images/blazor:15
Pseudo-terminal will not be allocated because stdin is not a terminal.
Warning: Permanently added 'proget.abcdefg.cn,47.106.133.5' (ECDSA) to the list of known hosts.
Permission denied, please try again.
Permission denied, please try again.
username@proget.abcdefg.cn: Permission denied (publickey,password).
Cleaning up project directory and file based variables 00:01
ERROR: Job failed: exit code 1

很清楚,SSH登入服务器的时候,被拒绝了。

# 7、让Gitlab的Runner能自动登入用于运行容器的测试服务器

很简单,在服务器上创建名为tommy的linux用户,在该用户的/home/tommy/.ssh文件夹的密钥文件里,加入我们的公钥

# 8、再次触发自动集成

得到如下错误:

Welcome to Alibaba Cloud Elastic Compute Service !
The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.
bash: /home/great/docker/gitlab/runner/deploy.sh: No such file or directory
Cleaning up project directory and file based variables 00:01
ERROR: Job failed: exit code 1

上述错误很简单,是服务器的/home/greate/docker/gitlab/runner这个目录下,没有deploy.sh这个脚本,这个脚本的内容如下:

#!/bin/bash
conName=$1
eonPort=$2
conPort=$3
images=$4
count=`docker ps -a |grep "$conName"|wc -l `
if [ $count -eq 0 ];then
echo "$conName container is not exit"
else
id=$(docker ps -a |grep "$conName" |awk '{print $1}')
for i in $id
do
docker stop $i
docker rm $i
done
fi
docker rmi $images
docker login -u david -p NXbdusoeiu*2349243_ded docker.amicap.cn
docker run --restart=always -d --name $conName -v /mnt/config:/var/config -e ASPNETCORE_ENVIRONMENT=$5 -p $eonPort:$conPort $images

拷贝到服务器后,记得改一下权限。

# 9、再次触发自动集成

在Gitlab中的完整日志控制台输出如下

Running with gitlab-runner 15.11.0 (436955cb)
on gr05 YozfsKoh, system ID: r_QId06ioCL2oU
Preparing the "docker" executor 00:01
Using Docker executor with image proget.abcdefg.cn/gitlab/runner:7.0 ...
Authenticating with credentials from $DOCKER_AUTH_CONFIG
Pulling docker image proget.abcdefg.cn/gitlab/runner:7.0 ...
Using docker image sha256:79e3cb48a17b32ddebfbd69a5cee6f9f4cc0c9c3fb0dd669bd8bed8a6690de95 for proget.abcdefg.cn/gitlab/runner:7.0 with digest proget.abcdefg.cn/gitlab/runner@sha256:a467584163ae036b191065de98fde78f378ef84ef06feef5be66f272e0b7504b ...
Preparing environment 00:00
Running on runner-yozfskoh-project-8-concurrent-0 via gr02...
Getting source from Git repository 00:01
Fetching changes with git depth set to 20...
Reinitialized existing Git repository in /builds/YozfsKoh/0/study/blazor-one/.git/
Checking out b34700f3 as detached HEAD (ref is main)...
Skipping Git submodules setup
Restoring cache 00:01
Checking cache for default-protected...
No URL provided, cache will not be downloaded from shared cache server. Instead a local version of cache will be extracted.
Successfully extracted cache
Executing "step_script" stage of the job script 00:01
Using docker image sha256:79e3cb48a17b32ddebfbd69a5cee6f9f4cc0c9c3fb0dd669bd8bed8a6690de95 for proget.abcdefg.cn/gitlab/runner:7.0 with digest proget.abcdefg.cn/gitlab/runner@sha256:a467584163ae036b191065de98fde78f378ef84ef06feef5be66f272e0b7504b ...
$ mkdir -p ~/.ssh
$ chmod 700 ~/.ssh
$ cd /root/.ssh
$ cp /home/gitlab-runner/ssh/* .
$ echo "部署到Brain测试站……"
部署到Brain测试站……
$ cd /home/gitlab-runner/scripts
$ bash ssh-deploy.sh blazor_one_test 8606 80 $BLAZOR_DEV_REPO:$BLAZORONE_IMAGE_TAG amisoft $DOCKER_DEV_SERVER $DOCKER_DEV_USERNAME $DOCKER_DEV_PASSWORD $SSH_AUTO_LOGIN_USER $TEST_APP_SERVER
docker容器实例名称: blazor_one_test
目标服务器对外端口号 8606
docker容器开放端口号 80
docker镜像URL proget.abcdefg.cn/study-images/blazor:17
容器启动配置环境 amisoft
Docker服务器DNS名称 proget.abcdefg.cn
登入Docker服务器的用户名称 username@docker
登入Docker服务器的密码 MySecretPassword
SSH自动登入目标服务器使用的用户名 great
SSH自动登入的目标服务器 proget.abcdefg.cn
在服务器上执行的命令是
docker run -d --privileged=true --restart=always -d --name blazor_one_test -v /mnt/data/yee-change:/var/config -e ASPNETCORE_ENVIRONMENT=amisoft -p 8606:80 proget.abcdefg.cn/study-images/blazor:17
Pseudo-terminal will not be allocated because stdin is not a terminal.
Warning: Permanently added 'proget.abcdefg.cn,47.106.133.5' (ECDSA) to the list of known hosts.
Permission denied, please try again.
Permission denied, please try again.
great@proget.abcdefg.cn: Permission denied (publickey,password).
Cleaning up project directory and file based variables 00:00
ERROR: Job failed: exit code 1

# 10、如果Gitlab的Runner不联络服务器,不领取工作

可以执行下面两个命令

root@dev-server:~# docker exec -it gr02 gitlab-runner verify
Runtime platform arch=amd64 os=linux pid=7 revision=436955cb version=15.11.0
Running in system-mode. Verifying runner... is alive runner=YozfsKoh
root@dev-server:~# docker exec -it gr02 gitlab-runner restart
Runtime platform arch=amd64 os=linux pid=28 revision=436955cb version=15.11.0

# 11、登入被拒绝

查了很多文件,也没搞定。于是换了一台测试服务器。成功发布

Running with gitlab-runner 15.11.0 (436955cb)
on gr05 YozfsKoh, system ID: r_QId06ioCL2oU
Preparing the "docker" executor 00:01
Using Docker executor with image proget.abcdefg.cn/gitlab/runner:7.0 ...
Authenticating with credentials from $DOCKER_AUTH_CONFIG
Pulling docker image proget.abcdefg.cn/gitlab/runner:7.0 ...
Using docker image sha256:79e3cb48a17b32ddebfbd69a5cee6f9f4cc0c9c3fb0dd669bd8bed8a6690de95 for proget.abcdefg.cn/gitlab/runner:7.0 with digest proget.abcdefg.cn/gitlab/runner@sha256:a467584163ae036b191065de98fde78f378ef84ef06feef5be66f272e0b7504b ...
Preparing environment 00:00
Running on runner-yozfskoh-project-8-concurrent-0 via gr02...
Getting source from Git repository 00:01
Fetching changes with git depth set to 20...
Reinitialized existing Git repository in /builds/YozfsKoh/0/study/blazor-one/.git/
Checking out 832423e6 as detached HEAD (ref is main)...
Skipping Git submodules setup
Restoring cache 00:01
Checking cache for default-protected...
No URL provided, cache will not be downloaded from shared cache server. Instead a local version of cache will be extracted.
Successfully extracted cache
Executing "step_script" stage of the job script 00:39
Using docker image sha256:79e3cb48a17b32ddebfbd69a5cee6f9f4cc0c9c3fb0dd669bd8bed8a6690de95 for proget.abcdefg.cn/gitlab/runner:7.0 with digest proget.abcdefg.cn/gitlab/runner@sha256:a467584163ae036b191065de98fde78f378ef84ef06feef5be66f272e0b7504b ...
$ mkdir -p ~/.ssh
$ chmod 700 ~/.ssh
$ cd /root/.ssh
$ cp /home/gitlab-runner/ssh/* .
$ echo "部署到Brain测试站……"
部署到Brain测试站……
$ cd /home/gitlab-runner/scripts
$ bash ssh-deploy.sh blazor_one_test 8606 80 $BLAZOR_DEV_REPO:$BLAZORONE_IMAGE_TAG AliyunTest $DOCKER_DEV_SERVER $DOCKER_DEV_USERNAME $DOCKER_DEV_PASSWORD $SSH_AUTO_LOGIN_USER $TEST_APP_SERVER
docker容器实例名称: blazor_one_test
目标服务器对外端口号 8606
docker容器开放端口号 80
docker镜像URL proget.abcdefg.cn/study-images/blazor:22
容器启动配置环境 AliyunTest
Docker服务器DNS名称 proget.abcdefg.cn
登入Docker服务器的用户名称 username@docker
登入Docker服务器的密码 MySecret123
SSH自动登入目标服务器使用的用户名 david
SSH自动登入的目标服务器 172.16.0.199
在服务器上执行的命令是
docker run -d --privileged=true --restart=always -d --name blazor_one_test -v /mnt/data/yee-change:/var/config -e ASPNETCORE_ENVIRONMENT=AliyunTest -p 8606:80 proget.abcdefg.cn/study-images/blazor:22
Pseudo-terminal will not be allocated because stdin is not a terminal.
Warning: Permanently added '172.16.0.199' (ECDSA) to the list of known hosts.
Welcome to Ubuntu 22.04.2 LTS (GNU/Linux 5.15.0-72-generic x86_64)
* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/advantage
System information as of Sun May 21 07:07:31 PM UTC 2023
System load: 1.8740234375
Usage of /: 43.6% of 97.87GB
Memory usage: 21%
Swap usage: 0%
Temperature: 76.0 C
Processes: 495
Users logged in: 1
IPv4 address for br-520215db1f30: 172.20.0.1
IPv4 address for br-5be0717938c9: 172.19.0.1
IPv4 address for br-76c941d48dc2: 10.10.3.1
IPv4 address for br-f98ed0d36211: 172.18.0.1
IPv4 address for docker0: 172.17.0.1
IPv4 address for enp86s0: 172.16.0.199
* Strictly confined Kubernetes makes edge and IoT secure. Learn how MicroK8s
just raised the bar for easy, resilient and secure K8s cluster deployment.
https://ubuntu.com/engage/secure-kubernetes-at-the-edge
Expanded Security Maintenance for Applications is not enabled.
1 update can be applied immediately.
To see these additional updates run: apt list --upgradable
Enable ESM Apps to receive additional future security updates.
See https://ubuntu.com/esm or run: sudo pro status
4a109ae04f06
4a109ae04f06
Untagged: proget.abcdefg.cn/study-images/blazor:22
Untagged: proget.abcdefg.cn/study-images/blazor@sha256:44721bba14a6d98370582bb875eedb8a20809febe60e64169fee767b5edee0de
Deleted: sha256:0979c4238750443e1e0174fb1dfae269fac53e701eea075ec09baa8e921ff258
Deleted: sha256:bc05348c1108ee9a0c7d92cbd13fab85cdec49a9e540b462e06298f1eb82b3fb
Deleted: sha256:b6692a838b82591c27920dee0e947bb5b221843b983644e2b4555e5e0f37362b
Deleted: sha256:5012a44cce34ce6e752a17db8d5c935e336e84f78239389e756d1163790c1fb5
Deleted: sha256:08c9e070d99c38128ba4615a7f30a31349a09f95323e075f1456fd97a9a3e8e5
Deleted: sha256:6a3a81deb5e13495f765faaccceab8a4f46a82caa7ae4968a7bc7fea973431dc
Deleted: sha256:86de30b98c0d4a0999180ff2971a9a7269596d90d9484048f49757c1ac90ec35
Deleted: sha256:9221e97be3386aa9ad1d2c386919536261cb30ed0117bc300894b542f344cd9d
WARNING! Using --password via the CLI is insecure. Use --password-stdin.
WARNING! Your password will be stored unencrypted in /home/david/.docker/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credentials-store
Login Succeeded
Unable to find image 'proget.abcdefg.cn/study-images/blazor:22' locally
22: Pulling from study-images/blazor
9e3ea8720c6d: Already exists
2436f232d040: Already exists
9a2730c0a140: Already exists
6bb6cfc88137: Already exists
8bc8046fd854: Already exists
5016cd0016e4: Already exists
59395839e470: Already exists
19dc23f69568: Already exists
71f1b4b01e35: Already exists
1868690bc889: Already exists
371a028335d5: Already exists
c110905bfc27: Already exists
63d18f70c3d6: Already exists
424a907a98a6: Already exists
a2552f8f5db0: Already exists
cd1c5a79ba5c: Already exists
aefe6775f233: Already exists
31a7c2980e89: Already exists
df0689172fdf: Pulling fs layer
658b7d3a4525: Pulling fs layer
df0689172fdf: Verifying Checksum
df0689172fdf: Pull complete
658b7d3a4525: Verifying Checksum
658b7d3a4525: Download complete
658b7d3a4525: Pull complete
Digest: sha256:44721bba14a6d98370582bb875eedb8a20809febe60e64169fee767b5edee0de
Status: Downloaded newer image for proget.abcdefg.cn/study-images/blazor:22
bc571017f1006bdaed1c000110199d95d0d5c1a6cd7609bc9c26b7a938b9dd29
Saving cache for successful job 00:01
Creating cache default-protected...
WARNING: node_modules/: no matching files. Ensure that the artifact path is relative to the working directory (/builds/YozfsKoh/0/study/blazor-one)
Archive is up to date!
Created cache
Cleaning up project directory and file based variables 00:01
Job succeeded

12、在测试服务器上,运行docker logs blazor_one_test

发现不停的报如下错误:

[18:57:26 FTL] Host terminated unexpectedly!
Volo.Abp.AbpInitializationException: An error occurred during ConfigureServicesAsync phase of the module Volo.Abp.OpenIddict.AbpOpenIddictAspNetCoreModule, Volo.Abp.OpenIddict.AspNetCore, Version=7.2.2.0, Culture=neutral, PublicKeyToken=null. See the inner exception for details.
---> System.IO.FileNotFoundException: Signing Certificate couldn't found: /app/authserver.pfx
at Study.BlazorOne.Blazor.BlazorOneBlazorModule.GetSigningCertificate(IWebHostEnvironment hostingEnv, IConfiguration configuration) in /src/src/Study.BlazorOne.Blazor/BlazorOneBlazorModule.cs:line 357
at Study.BlazorOne.Blazor.BlazorOneBlazorModule.<>c__DisplayClass0_0.<PreConfigureServices>b__3(OpenIddictServerBuilder builder) in /src/src/Study.BlazorOne.Blazor/BlazorOneBlazorModule.cs:line 128
at Volo.Abp.Options.PreConfigureActionList`1.Configure(TOptions options)
at Microsoft.Extensions.DependencyInjection.ServiceCollectionPreConfigureExtensions.ExecutePreConfiguredActions[TOptions](IServiceCollection services, TOptions options)
at Volo.Abp.OpenIddict.AbpOpenIddictAspNetCoreModule.<>c__DisplayClass1_0.<AddOpenIddictServer>b__0(OpenIddictServerBuilder builder)
at Microsoft.Extensions.DependencyInjection.OpenIddictServerExtensions.AddServer(OpenIddictBuilder builder, Action`1 configuration)
at Volo.Abp.OpenIddict.AbpOpenIddictAspNetCoreModule.AddOpenIddictServer(IServiceCollection services)
at Volo.Abp.OpenIddict.AbpOpenIddictAspNetCoreModule.ConfigureServices(ServiceConfigurationContext context)
at Volo.Abp.Modularity.AbpModule.ConfigureServicesAsync(ServiceConfigurationContext context)
at Volo.Abp.AbpApplicationBase.ConfigureServicesAsync()
--- End of inner exception stack trace ---
at Volo.Abp.AbpApplicationBase.ConfigureServicesAsync()
at Volo.Abp.AbpApplicationFactory.CreateAsync[TStartupModule](IServiceCollection services, Action`1 optionsAction)
at Microsoft.Extensions.DependencyInjection.ServiceCollectionApplicationExtensions.AddApplicationAsync[TStartupModule](IServiceCollection services, Action`1 optionsAction)
at Microsoft.Extensions.DependencyInjection.WebApplicationBuilderExtensions.AddApplicationAsync[TStartupModule](WebApplicationBuilder builder, Action`1 optionsAction)
at Study.BlazorOne.Blazor.Program.Main(String[] args) in /src/src/Study.BlazorOne.Blazor/Program.cs:line 36

未完待续。

用Docker发布Study.BlazorOne.Blazor到公网测试服务器的更多相关文章

  1. .NET Core使用skiasharp文字头像生成方案(基于docker发布)

    一.问题背景 目前.NET Core下面针对于图像处理的库微软并没有集成,在.NET FrameWork下我们已经习惯使用System.Drawing类库做简单的图像处理,到了.NET Core下一脸 ...

  2. Docker 发布 Abp net core web 服务

    Docker 发布 Abp net core web 服务 准备工作:Abp 项目,这个是模板下载地址 https://aspnetboilerplate.com/Templates (本例使用的是S ...

  3. docker 发布方式尝试

    docker 发布方式尝试 目前有个小项目, 尝试用docker的方式来发布, 项目只有一个节点, 使用 kubenate 有点小题大做, 所以采用docker-compose来发布. 发布过程 GI ...

  4. docker 发布应用时添加 git revision

    概要 实施步骤 获取 git revision 前端 git revision 注入 后端 git revision 注入 概要 docker 发布应用时, 将 git revision 注入到应用中 ...

  5. Jenkins+Harbor+Docker发布

    使用Jenkins发布Docke 需要准备的,docker,jenkins,Harbor docker安装 安装依赖: # yum install -y yum-utils device-mapper ...

  6. 结合docker发布后端项目(基于gradle包管理)的shell脚本

    结合docker发布后端项目(基于gradle包管理)的shell脚本 本教程依据个人理解并经过实际验证为正确,特此记录下来,权当笔记. 注:基于linux操作系统(敏感信息都进行了处理) 目前主流的 ...

  7. 结合docker发布前端项目(基于npm包管理)的shell脚本

    结合docker发布前端项目(基于npm包管理)的shell脚本 本教程依据个人理解并经过实际验证为正确,特此记录下来,权当笔记. 注:基于linux操作系统 目前主流的前后端分离的项目中,常常在部署 ...

  8. docker发布.net core程序的坑

    docker发布遇到的两个问题 1:Could not resolve CoreCLR path. For more details, enable tracing by setting COREHO ...

  9. Angular入门到精通系列教程(14)- Angular 编译打包 & Docker发布

    目录 1. 概要 2. 编译打包 2.1. 基本打包命令 2.2. 打包部署到二级目录 3. Angular站点的发布 3.1. web服务器发布 3.2. 使用docker发布 4. 总结 环境: ...

  10. 使用Docker发布blazor wasm

    Blazor编译后的文件是静态文件,所以我们只需要一个支持静态页面的web server即可. 根据不同项目,会用不同的容器编排,本文已无网关的情况下为例,一步一步展示如何打包进docker 需求 H ...

随机推荐

  1. [转帖]线上Java 高CPU占用、高内存占用排查思路

    一.前言 处理过线上问题的同学基本上都会遇到系统突然运行缓慢,CPU 100%,以及Full GC次数过多的问题.当然,这些问题的最终导致的直观现象就是系统运行缓慢,并且有大量的报警.本文主要针对系统 ...

  2. OpenIM Open Source Instant Messaging Project Docker Compose Deployment Guide

    The deployment of OpenIM involves multiple components and supports various methods including source ...

  3. vim 从嫌弃到依赖(18)——查找模式进阶

    上一篇文章中,我们初步结识了如何使用查找模式,也能够通过n和 N进行查找.这篇将会介绍搜索中更高级的用法.另外在写上一篇文章的时候我发现介绍查找相关内容的时候不能用动图来演示,主要是因为输入的内容太多 ...

  4. .NET MAUI 简介

    欢迎使用.NET 多平台应用程序 UI.此版本标志着我们在统一 .NET 平台的多年旅程中的新里程碑.现在,您和超过 500 万其他 .NET 开发人员拥有面向 Android.iOS.macOS 和 ...

  5. 样本数量不平衡问题方案(Focal Loss & Circle Loss)

    1.Focal Loss focal loss是最初由何恺明提出的,最初用于图像领域解决数据不平衡造成的模型性能问题.本文试图从交叉熵损失函数出发,分析数据不平衡问题,focal loss与交叉熵损失 ...

  6. 【1】Anaconda安装超简洁教程,配置环境、创建虚拟环境、添加镜像源

    相关文章: [1]Anaconda安装超简洁教程,瞬间学会! [2]Anaconda下:ipython文件的打开方式,Jupyter Notebook中运行.py文件,快速打开ipython文件的方法 ...

  7. 8.1 Windows驱动开发:内核文件读写系列函数

    在应用层下的文件操作只需要调用微软应用层下的API函数及C库标准函数即可,而如果在内核中读写文件则应用层的API显然是无法被使用的,内核层需要使用内核专有API,某些应用层下的API只需要增加Zw开头 ...

  8. 5.14 汇编语言:仿写Switch选择结构

    选择结构,也称为switch语句,是计算机编程中的一种控制结构,用于根据表达式的值选择不同的执行路径.它允许程序根据表达式的值来决定执行哪个代码块,从而实现多分支选择逻辑.switch语句由一个表达式 ...

  9. LeetCode刷题日记 2020/08/18

    给定一个单链表,其中的元素按升序排序,将其转换为高度平衡的二叉搜索树. 本题中,一个高度平衡二叉树是指一个二叉树每个节点 的左右两个子树的高度差的绝对值不超过 1. 示例: 给定的有序链表: [-10 ...

  10. XPath从入门到精通:基础和高级用法完整指南,附美团APP匹配示例

    XPath 通常用来进行网站.XML (APP )和数据挖掘,通过元素和属性的方式来获取指定的节点,然后抓取需要的信息. 学习 XPath 语法之前,首先了解一下一些概念. 概念介绍 节点之间的关系 ...