至于nginx的docker制作,前面已介绍过。

现在使用gitlab在线编辑的方式,可实现Nginx的自定义配置并更新。

.gitlab-ci.yml内容如下:

variables:
  project_root: ./nginx
  www_root: /nginx/conf.d

stages:
  - deploy

php-deploy:
  when: manual
  stage: deploy
  script:
    - ls
    - echo deploy
    - sh -x deploy.sh
  tags:
    - php

deploy.sh内容如下:

#!/bin/sh

# $project_root and $www_root is set in gitlab ci/cd variables
# project_root is ./nginx; www_root is /nginx/conf.d
echo $project_root
echo $www_root
cp -ur $project_root/* $www_root
docker exec -i nginx nginx -s reload

gitlab runner已配置好。因为是本地更新,采用shell方式即可。

为了谨慎,采用手动触发。

最新文章

  1. objective-c 语法快速过(1)
  2. UVA2636
  3. [Tool] 使用CodeMaid自动程序排版
  4. [转]如何在 Visual Studio 中使用 Git 同步代码到 CodePlex
  5. SQLServer排序时与读取的记录会影响到结果?
  6. Oracle安装基本步骤
  7. 坚持使用GNU/Linux
  8. vue 生命周期
  9. uva 1583
  10. 巨人大哥谈Web应用中的Session(session详解)
  11. android官方技术文档翻译——Case 标签中的常量字段
  12. 深入学习MySQL事务:ACID特性的实现原理
  13. 低成本制作基于OpenWRT的渗透工具
  14. 项目中的Launch_getSecurityEntitle_postlaunch
  15. (七)STL适配器
  16. mysql真的不能做搜索引擎吗?
  17. drf-序列化器的理解
  18. 移动端适配之sprite雪碧图背景定位
  19. SQL - 查询某一字段值相同而另一字段值最大的记录
  20. Android数据存储之SQLite

热门文章

  1. 使用二进制的方式部署 K8S-1.16 高可用集群
  2. [转] Win10插入U盘后双击无法打开,无法访问,显示设备未就绪;驱动哥帮你解决
  3. Java 8 集合之流式(Streams)操作, Streams API 详解
  4. SpringBoot配置文件敏感信息加密-jasypt
  5. centos发布 7.7.1908版本了,怎么把老版本更新到新版本了?
  6. 【LEETCODE】47、985. Sum of Even Numbers After Queries
  7. go 学习笔记(4) --变量与常量
  8. Spring Cloud Alibaba学习笔记(24) - Spring Boot Actuator 监控数据可视化:Spring Boot Admin
  9. 无法将文件xxx复制到xxx文件xxx正由另一进程使用,因此该进程无法访问此文件
  10. MyEclipse的 lib和Build path(构建路径)