Skip to content
.NET 开发者指北.NET 开发者指北
CMS
.NET指北
FreeKit
Docker
关于
博客
github icon
    • Docker
      • Docker 命令行
        • Docker 配置 Baget
          • Docker 配置 Jenkins
            • Docker 配置 MySql
              • Docker 配置 Nacos
                • Docker 配置 Portainer
                  • Docker 配置 Redis
                    • Docker部署CMS命令
                      • 部署docker
                        • nuget api key

                      Docker部署CMS命令

                      calendar icon2022年6月29日timer icon大约 1 分钟word icon约 323 字

                      此页内容
                      • 部署docker
                      • nuget api key

                      # Docker部署CMS命令

                      # 部署docker

                      #判断是否存在webnotebook容器
                      docker ps | grep lincms-web-1 &> /dev/null
                      #如果不存在,则Remove
                      if [ $? -ne 0 ]
                      then
                          echo "lincms-web container not exist continue.. "
                      else
                          echo "remove lincms-web-1 container"
                          docker rm lincms-web-1 -f
                      fi
                      
                      docker images | grep registry.cn-hangzhou.aliyuncs.com/igeekfan/lincms-web &> /dev/null
                      
                      if [ $? -ne 0 ]
                      then
                          echo "image does not exist , continue..."
                      else
                          echo "image exists !!! remove it"
                          docker rmi --force registry.cn-hangzhou.aliyuncs.com/igeekfan/lincms-web
                      fi
                      #从阿里云拉取刚刚push的镜像
                      docker pull registry.cn-hangzhou.aliyuncs.com/igeekfan/lincms-web
                      
                      docker run --restart unless-stopped -p 5011:80 --name lincms-web-1 -d registry.cn-hangzhou.aliyuncs.com/igeekfan/lincms-web
                      
                      docker rm lincms-web-2 -f
                      docker rm lincms-web-3 -f
                      docker rm lincms-web-4 -f
                      
                      docker run --restart unless-stopped -p 5012:80 --name lincms-web-2 -d registry.cn-hangzhou.aliyuncs.com/igeekfan/lincms-web
                      docker run --restart unless-stopped -p 5020:80 --name lincms-web-3 -d registry.cn-hangzhou.aliyuncs.com/igeekfan/lincms-web
                      docker run --restart unless-stopped -p 5021:80 --name lincms-web-4 -d registry.cn-hangzhou.aliyuncs.com/igeekfan/lincms-web
                      
                      
                      
                      1
                      2
                      3
                      4
                      5
                      6
                      7
                      8
                      9
                      10
                      11
                      12
                      13
                      14
                      15
                      16
                      17
                      18
                      19
                      20
                      21
                      22
                      23
                      24
                      25
                      26
                      27
                      28
                      29
                      30
                      31
                      32
                      33
                      34

                      # nuget api key

                      Your-API-Key
                      
                      1
                      nuget SetApiKey Your-API-Key
                      dotnet nuget push IGeekFan.AspNetCore.Knife4jUI.0.0.11.nupkg --api-key Your-API-Key --source https://api.nuget.org/v3/index.json
                      
                      
                      1
                      2
                      3
                      {
                        //"DefaultConnection": "Data Source=|DataDirectory|\\SampleApp.db;",
                        "Sqlite1": "Data Source=d:\\SampleApp1.db",
                        "Sqlite2": "Data Source=d:\\SampleApp2.db",
                        "Oracle": "user id=test;password=123qwe; data source=//127.0.0.1:1521/ORCL;Pooling=true;Min Pool Size=1",
                        "MySql": "Data Source=127.0.0.1;Port=3306;User ID=root;Password=root; Initial Catalog=cccddd;Charset=utf8; SslMode=none;Min pool size=1",
                        "SqlServer": "Data Source=(localdb)\\MSSQLLocalDB;Initial Catalog=cccddd;Pooling=true;Min Pool Size=1",
                        "PostgreSQL": "Host=127.0.0.1;Port=5432;Username=postgres;Password=postgresql; Database=postgres;Pooling=true;Minimum Pool Size=1"
                      }
                      
                      1
                      2
                      3
                      4
                      5
                      6
                      7
                      8
                      9
                      edit icon在 GitHub 上编辑此页open in new window
                      上次编辑于: 2022/6/29 19:17:23
                      贡献者: igeekfan
                      上一页
                      Docker 配置 Redis
                      MIT Licensed | Copyright © 2021-present luoyunchong
                      苏ICP备16046457号-1

                      该应用可以安装在你的 PC 或移动设备上。这将使该 Web 应用程序外观和行为与其他应用程序相同。它将在出现在应用程序列表中,并可以固定到主屏幕,开始菜单或任务栏。此 Web 应用程序还将能够与其他应用程序和你的操作系统安全地进行交互。

                      详情