From 1f9c36d84427918f36437d00462c0373941bdb31 Mon Sep 17 00:00:00 2001 From: Sebastian Hugentobler Date: Mon, 11 Sep 2017 11:15:17 +0200 Subject: [PATCH] use gitlab docker registry --- .gitlab-ci.yml | 10 ++++++++++ Dockerfile | 4 ++-- rootfs/etc/confd/templates/nginx.conf.tmpl | 10 +--------- rootfs/etc/services.d/redis/run | 2 +- 4 files changed, 14 insertions(+), 12 deletions(-) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..dfde774 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,10 @@ +build: + image: docker:latest + services: + - docker:dind + stage: build + script: + - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY + - docker build --pull --tag $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME --tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA . + - docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME + - docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA diff --git a/Dockerfile b/Dockerfile index b456740..c500395 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ -FROM quay.io/thallian/confd-env:latest +FROM registry.gitlab.com/thallian/docker-confd-env:master -ENV OPENRESTY_VERSION 1.11.2.2 +ENV OPENRESTY_VERSION 1.11.2.4 RUN addgroup syncer RUN adduser -h /app -D -G syncer syncer diff --git a/rootfs/etc/confd/templates/nginx.conf.tmpl b/rootfs/etc/confd/templates/nginx.conf.tmpl index d87ce9c..ae4192f 100644 --- a/rootfs/etc/confd/templates/nginx.conf.tmpl +++ b/rootfs/etc/confd/templates/nginx.conf.tmpl @@ -16,17 +16,9 @@ http { # Gin initialization {{"{{"}}GIN_INIT{{"}}"}} - ssl_session_cache shared:SSL:10m; - ssl_session_timeout 10m; - server { # List port - listen {{"{{"}}GIN_PORT{{"}}"}} ssl; - - ssl_protocols TLSv1 TLSv1.1 TLSv1.2; - ssl_certificate /etc/ssl/nginx/{{getenv "CERT_NAME" "fullchain.pem"}}; - ssl_certificate_key /etc/ssl/nginx/{{getenv "KEY_NAME" "privkey.pem"}}; - ssl_ciphers HIGH:!aNULL:!MD5; + listen {{"{{"}}GIN_PORT{{"}}"}}; keepalive_timeout 70; diff --git a/rootfs/etc/services.d/redis/run b/rootfs/etc/services.d/redis/run index 3fd4b99..39fc60e 100644 --- a/rootfs/etc/services.d/redis/run +++ b/rootfs/etc/services.d/redis/run @@ -1,3 +1,3 @@ #!/usr/bin/with-contenv sh -s6-setuidgid redis redis-server /etc/redis.conf +exec s6-setuidgid redis redis-server /etc/redis.conf