commit 9a93983592bb295ee0b18b82c386012d933247f9 Author: Phil Kunz Date: Wed Jan 24 16:46:15 2018 +0100 initial diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..deb2cfe --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,97 @@ +# gitzone docker +image: hosttoday/ht-docker-dbase:npmci +services: + - docker:dind +variables: + DOCKER_DRIVER: overlay + + +stages: + - buildAndTest + - build + - test + - release + - trigger + - pages + +before_script: + - yarn global add npmci + - npmci docker login + +buildAndTest: + stage: buildAndTest + script: + - npmci docker build + - npmci docker test + except: + - tags + - triggers + tags: + - lossless + - priv + +build: + stage: build + script: + - npmci docker build + - npmci docker push registry.gitlab.com test + only: + - tags + - triggers + tags: + - lossless + - priv + + +test: + stage: test + script: + - npmci docker pull registry.gitlab.com test + - npmci docker test + only: + - tags + - triggers + tags: + - lossless + - priv + +release: + stage: release + script: + - npmci docker pull registry.gitlab.com test + - npmci docker push docker.io + - npmci docker push registry.gitlab.com + only: + - tags + - triggers + tags: + - lossless + - priv + +trigger: + stage: trigger + script: + - npmci trigger + only: + - tags + - triggers + tags: + - lossless + - priv + +pages: + before_script: + - 'npmci -v' + image: hosttoday/ht-docker-node:npmci + stage: pages + script: + - npmci command yarn global add npmpage + - npmci command npmpage + only: + - tags + tags: + - docker + artifacts: + expire_in: 1 week + paths: + - public diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..8c1ede4 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,2 @@ +FROM blacktop/elastic-stack:latest +COPY ./ssl.kibana.conf /etc/nginx/conf.d/ diff --git a/ssl.kibana.conf b/ssl.kibana.conf new file mode 100644 index 0000000..2db3985 --- /dev/null +++ b/ssl.kibana.conf @@ -0,0 +1,54 @@ +server { + listen [::]:80 default_server; + listen 80 default_server; + + server_name _; + + return 301 https://$host$request_uri; +} + +server { + listen [::]:443 ssl http2; + listen 443 ssl http2; + + server_name _; + + auth_basic "Restricted Access"; + auth_basic_user_file /etc/nginx/htpasswd.users; + + ssl on; + ssl_certificate /etc/nginx/ssl/kibana.crt; + ssl_certificate_key /etc/nginx/ssl/kibana.key; + + location / { + proxy_pass http://127.0.0.1:5601; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection 'upgrade'; + proxy_set_header Host $host; + proxy_cache_bypass $http_upgrade; + } +} + +server { + listen [::]:9201 ssl http2; + listen 443 ssl http2; + + server_name _; + + auth_basic "Restricted Access"; + auth_basic_user_file /etc/nginx/htpasswd.users; + + ssl on; + ssl_certificate /etc/nginx/ssl/kibana.crt; + ssl_certificate_key /etc/nginx/ssl/kibana.key; + + location / { + proxy_pass http://127.0.0.1:9200; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection 'upgrade'; + proxy_set_header Host $host; + proxy_cache_bypass $http_upgrade; + } +} \ No newline at end of file