Changed renew post-hook to call nginx

This commit is contained in:
Deon George 2018-02-08 20:25:13 +11:00
parent 5b75da0aab
commit fbb05f15df
2 changed files with 10 additions and 10 deletions

View File

@ -6,24 +6,23 @@ stages:
variables:
VERSION: latest
DOCKER_IMAGE: leenooks/nginx
DOCKER_REGISTRY: registry.leenooks.net
DOCKER_HOST: tcp://${DOCKER_REGISTRY}-leenooks-ci-docker:2375
CACHETAG: build
DOCKER_HOST: tcp://${CI_REGISTRY}-leenooks-ci-docker:2375
services:
- ${DOCKER_REGISTRY}/leenooks/ci-docker:dind
- ${CI_REGISTRY}/leenooks/ci-docker:dind
before_script:
- docker info
- docker version
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN ${DOCKER_REGISTRY}
- echo "$CI_JOB_TOKEN" | docker login -u "$CI_REGISTRY_USER" "$CI_REGISTRY" --password-stdin
test:
stage: test
script:
- cat /etc/hosts
- env|sort
- docker build -t ${DOCKER_IMAGE}:${VERSION} .
- docker build -t ${CI_REGISTRY_IMAGE}:${VERSION} .
- docker images
only:
- debug
@ -31,9 +30,10 @@ test:
build:
stage: build
script:
- docker build -t ${DOCKER_IMAGE}:${VERSION} .
- docker tag ${DOCKER_IMAGE}:${VERSION} ${DOCKER_REGISTRY}/${DOCKER_IMAGE}:${VERSION}
- docker push ${DOCKER_REGISTRY}/${DOCKER_IMAGE}:${VERSION}
- docker pull ${CI_REGISTRY_IMAGE}:${CACHETAG} || true
- docker build --cache-from ${CI_REGISTRY_IMAGE}:${CACHETAG} -t ${CI_REGISTRY_IMAGE}:${VERSION} -t ${CI_REGISTRY_IMAGE}:${CACHETAG} .
- docker push ${CI_REGISTRY_IMAGE}:${VERSION}
- docker push ${CI_REGISTRY_IMAGE}:${CACHETAG}
tags:
- docker
only:

View File

@ -1,3 +1,3 @@
#!/bin/sh
certbot renew -q --config-dir /etc/nginx/conf.d/ssl/letsencrypt/ --renew-hook "kill 1"
certbot renew -q --config-dir /etc/nginx/conf.d/ssl/letsencrypt/ --renew-hook "/usr/sbin/nginx -s reload"