Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ha proxy addition #147

Merged
merged 3 commits into from
Jun 20, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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:/usr/local/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 /usr/local/etc/haproxy/grafana.crt
max-amb marked this conversation as resolved.
Show resolved Hide resolved
http-request redirect scheme https unless { ssl_fc }
default_backend webservers

backend webservers
server sv grafana-instance:3000 check
max-amb marked this conversation as resolved.
Show resolved Hide resolved
Loading