Skip to content

Commit

Permalink
Add monitoring stack
Browse files Browse the repository at this point in the history
  • Loading branch information
g3force committed May 26, 2021
1 parent 39caab3 commit 46608c8
Show file tree
Hide file tree
Showing 8 changed files with 2,018 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@
/config/vnc_rsa*
/config/passwords
/config/caddy_passwords
/config/portainer_password
**/__pycache__
.env
7 changes: 7 additions & 0 deletions config/caddy/Caddyfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@
}
}

portainer.{{ field_name }}.{{ root_domain }} {
reverse_proxy portainer:9000
}
grafana.{{ field_name }}.{{ root_domain }} {
reverse_proxy grafana:3000
}

vnc.{{ field_name }}.{{ root_domain }} {
reverse_proxy /guacamole/* guacamole:8080
@notGuacamole {
Expand Down
5 changes: 5 additions & 0 deletions config/docker/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,17 @@ SSH_PUBLIC_KEY=$(cat "${SSH_KEY_LOCATION}.pub")
set +e
POSTGRES_PASSWORD="$(tr -dc 'A-Za-z0-9' </dev/urandom | head -c 32)"
VNC_PW="$(tr -dc 'A-Za-z0-9' </dev/urandom | head -c 32)"
GRAFANA_PW="$(tr -dc 'A-Za-z0-9' </dev/urandom | head -c 32)"
PORTAINER_PW="$(tr -dc 'A-Za-z0-9' </dev/urandom | head -c 32)"
set -e

echo -n "${PORTAINER_PW}" > "${CONFIG_DIR}/portainer_password"

cat <<EOF >"${ENV_FILE}"
TEAM_LIMIT_MEM=2g
TEAM_LIMIT_CPU=2
SSH_PUBLIC_KEY=${SSH_PUBLIC_KEY}
POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
VNC_PW=${VNC_PW}
GRAFANA_PW=${GRAFANA_PW}
EOF
Loading

0 comments on commit 46608c8

Please sign in to comment.