Skip to content

Commit

Permalink
Merge pull request #147 from max-amb/ha-proxy_addition
Browse files Browse the repository at this point in the history
Ha proxy addition
  • Loading branch information
khalford committed Jun 20, 2024
2 parents 57d906d + ed9deaa commit 241744b
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 4 deletions.
8 changes: 4 additions & 4 deletions grafana_monitoring/readme.md → grafana_monitoring/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
All required environment variables can be found in env.sh and should be updated before deploying, environment variables are included in compose.yaml and will be copied to the container

#compose.yaml
# compose.yaml
Specifies the image, name, and environment variables used when arranging docker

#cloud_datasource.yaml
# cloud_datasource.yaml
When grafana see this file it makes connection to the databases specified in this file

#env.sh
# env.sh
Stores environment variables which cannot be published onto github
User should edit and run this script to export the environment variables
User should edit and run this script to export the environment variables
15 changes: 15 additions & 0 deletions grafana_monitoring/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,18 @@ services:
volumes:
- ./cloud_datasource.yaml:/etc/grafana/provisioning/datasources/cloud_datasource.yaml
- ./cloud-grafana-dashboards/:/etc/grafana/provisioning/dashboards
networks:
- backend

haproxy:
image: haproxytech/haproxy-alpine:2.4
networks:
- backend
ports:
- 80:80
- 443:443
volumes:
- ./haproxy.cfg:/etc/haproxy/haproxy.cfg

networks:
backend:
20 changes: 20 additions & 0 deletions grafana_monitoring/haproxy.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
global
stats socket /var/run/api.sock user haproxy group haproxy mode 660 level admin expose-fd listeners
log stdout format raw local0 info

defaults
mode http
timeout client 10s
timeout connect 5s
timeout server 10s
timeout http-request 10s
log global

frontend myfrontend
bind :80
bind :443 ssl crt /etc/haproxy/grafana.crt
http-request redirect scheme https unless { ssl_fc }
default_backend webservers

backend webservers
server grafana-server grafana-instance:3000 check

0 comments on commit 241744b

Please sign in to comment.