diff --git a/.gitignore b/.gitignore index 4e3c714..6843d35 100644 --- a/.gitignore +++ b/.gitignore @@ -71,3 +71,6 @@ monitoring/monitoring_*_dir **/*.bak_remove **/*.wrapped data + +# Keys +**/*.pem diff --git a/deploy_all.sh b/deploy_all.sh index ff54641..4885908 100755 --- a/deploy_all.sh +++ b/deploy_all.sh @@ -81,15 +81,12 @@ docker exec -it -u 0 grafana /var/lib/grafana/ds/add_dashboards.sh ### NOW LET'S SECURE GRAFANA -## CHECKING OUT ORIGINAL FILE -#echo -e "checking out original docker-compose.yml" -#git checkout docker-compose.yml -# ### STOPPING and REMOVING GRAFANA CONTAINER #echo -e "stopping & removing grafana container" #container_id=$(docker container ls | grep grafana| awk '{print $1}') #docker stop $container_id #docker rm $container_id +#find grafana -name '*.pem' -exec chmod 666 {} \; # ## REPLACING HTTP with HTTPS #echo -e "changing http to https" diff --git a/docker-compose.yml b/docker-compose.yml index 37ffff2..383e3e3 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -35,8 +35,8 @@ services: - private volumes: - grafana_lib:/var/lib/grafana -# - /etc/grafana/privkey1.pem:/etc/grafana/privkey1.pem:ro -# - /etc/grafana/fullchain1.pem:/etc/grafana/fullchain1.pem:ro +# - ${PWD}/grafana/privkey1.pem:/privkey1.pem:ro +# - ${PWD}/grafana/fullchain1.pem:/fullchain1.pem:ro - ${PWD}/grafana/:/var/lib/grafana/ds/ environment: GF_AUTH_ANONYMOUS_ENABLED: "false" @@ -44,8 +44,8 @@ services: GF_SECURITY_ADMIN_USER: "admin" GF_SERVER_PROTOCOL: "http" GF_SERVER_DOMAIN: "sebson.ddns.net" -# GF_SERVER_CERT_FILE: "/etc/grafana/fullchain1.pem" -# GF_SERVER_CERT_KEY: "/etc/grafana/privkey1.pem" +# GF_SERVER_CERT_FILE: "/fullchain1.pem" +# GF_SERVER_CERT_KEY: "/privkey1.pem" GF_SERVER_METRICS_ENABLED: "true" GF_SERVER_METRICS_INTERVAL_SECONDS: "10" INFLUXDB_URI: "http://influxdb:8086" @@ -102,7 +102,7 @@ services: - /var/run:/var/run:rw - /sys:/sys:ro - /var/lib/docker/:/var/lib/docker:ro - #- /cgroup:/cgroup:ro #doesn't work on MacOS only for Linux + - /cgroup:/cgroup:ro #doesn't work on MacOS only for Linux restart: unless-stopped expose: - 8080