From d3fc4e825f1534b635f287f41143bd71d65d262f Mon Sep 17 00:00:00 2001 From: Matthos Denys Date: Fri, 12 Mar 2021 19:43:02 +0300 Subject: [PATCH] final --- setup.sh | 4 +++- srcs/nginx/nginx.conf | 12 +++++++----- srcs/telegraf/Dockerfile | 4 +--- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/setup.sh b/setup.sh index 4913d8a..0add99e 100644 --- a/setup.sh +++ b/setup.sh @@ -4,7 +4,9 @@ IP=$(kubectl get node -o=custom-columns='DATA:status.addresses[0].address' | sed minikube addons enable metallb minikube addons enable metrics-server eval $(minikube docker-env) + minikube dashboard & + docker build -t nginx_image srcs/nginx docker build -t phpmyadmin_image srcs/phpmyadmin docker build -t mariadb-image srcs/mariadb @@ -26,4 +28,4 @@ kubectl apply -f srcs/yaml/grafana.yaml echo "Minikube IP: ${IP}" -/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --args --incognito --ignore-certificate-errors https://192.168.99.166/ \ No newline at end of file +/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --args --incognito --ignore-certificate-errors https://192.168.99.166/ \ No newline at end of file diff --git a/srcs/nginx/nginx.conf b/srcs/nginx/nginx.conf index 0de446a..077f4bd 100755 --- a/srcs/nginx/nginx.conf +++ b/srcs/nginx/nginx.conf @@ -18,19 +18,21 @@ http { ssl_certificate /etc/nginx/ssl/html.pem; ssl_certificate_key /etc/nginx/ssl/html.key; + + + location /wordpress { - return 307 https://$host:5050/; + return 307 https://192.168.99.166:5050/; } - location = ^(/phpmyadmin)$ { - proxy_pass https://192.168.99.166:5000/$1; - } - location /phpmyadmin { + + location /phpmyadmin/ { proxy_pass https://192.168.99.166:5000/; proxy_redirect /index.php /phpmyadmin/index.php; } + } } \ No newline at end of file diff --git a/srcs/telegraf/Dockerfile b/srcs/telegraf/Dockerfile index 73877d1..6c5f2e1 100755 --- a/srcs/telegraf/Dockerfile +++ b/srcs/telegraf/Dockerfile @@ -1,4 +1,4 @@ -FROM alpine:3.12 +FROM alpine:3.12 RUN apk update && apk add openrc ADD https://dl.influxdata.com/telegraf/releases/telegraf-1.17.3_linux_amd64.tar.gz /etc/ RUN tar -xzf /etc/telegraf-1.17.3_linux_amd64.tar.gz -C /etc/ ; \ @@ -6,8 +6,6 @@ RUN tar -xzf /etc/telegraf-1.17.3_linux_amd64.tar.gz -C /etc/ ; \ RUN mv /etc/telegraf-1.17.3 /telegraf RUN cp -r telegraf/* ./ RUN rm -rf /telegraf -RUN wget -q -O /etc/apk/keys/sgerrand.rsa.pub \ - https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub RUN wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.28-r0/glibc-2.28-r0.apk RUN apk add glibc-2.28-r0.apk RUN telegraf -sample-config telegraf.conf --input-filter cpu:mem --output-filter influxdb > telegraf.conf