Skip to content

Commit

Permalink
Removed unnecessary env variables and updated dashboard json to its m…
Browse files Browse the repository at this point in the history
…ost recent state
  • Loading branch information
kobudnik committed Mar 6, 2023
1 parent e463c89 commit c0c500e
Show file tree
Hide file tree
Showing 4 changed files with 114 additions and 47 deletions.
23 changes: 9 additions & 14 deletions config.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,18 @@
import dotenv from 'dotenv';
dotenv.config();

export const POSTGRES_HOST = process.env.POSTGRES_HOST
? process.env.POSTGRES_HOST
: 'localhost';
export const POSTGRES_NAME = process.env.POSTGRES_NAME
? process.env.POSTGRES_NAME
export const POSTGRES_NAME = process.env.DB_NAME
? process.env.DB_CONTAINER_NAME
: 'docketeer-db';
export const POSTGRES_PORT = process.env.POSTGRES_PORT
? Number(process.env.POSTGRES_PORT)
: 5432;
export const POSTGRES_USER = process.env.POSTGRES_USER
? process.env.POSTGRES_USER

export const POSTGRES_USER = process.env.DB_USER
? process.env.DB_USER
: 'postgres';
export const POSTGRES_PASS = process.env.POSTGRES_PASS
? process.env.POSTGRES_PASS
export const POSTGRES_PASS = process.env.DB_PASS
? process.env.DB_PASS
: 'postgres';
export const POSTGRES_SERVICE = process.env.POSTGRES_NAME
? process.env.POSTGRES_NAME
export const POSTGRES_SERVICE = process.env.DB_SERVICE_NAME
? process.env.DB_SERVICE_NAME
: 'db';
export const JWT_SECRET = process.env.JWT_SECRET
? process.env.JWT_SECRET
Expand Down
12 changes: 3 additions & 9 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ services:
- ./imageConfigs/postgres/docketeerdb:/var/lib/postgresql/data/

environment:
POSTGRES_DB: docketeer-db
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: 'docketeer-db'
POSTGRES_USER: 'postgres'
POSTGRES_PASSWORD: 'postgres'

cadvisor:
image: gcr.io/cadvisor/cadvisor:v0.47.1
Expand Down Expand Up @@ -51,7 +51,6 @@ services:
container_name: prometheus
ports:
- '9090:9090'

volumes:
- ./imageConfigs/prometheus/promData:/prometheus
depends_on:
Expand Down Expand Up @@ -87,8 +86,3 @@ services:
- 4000:4000
volumes:
- /var/run/docker.sock:/var/run/docker.sock

environment:
POSTGRES_USER: 'postgres'
depends_on:
- db
121 changes: 100 additions & 21 deletions imageConfigs/grafana/provisioning/dashboards/dashboard.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"graphTooltip": 1,
"id": 1,
"links": [],
"liveNow": false,
"liveNow": true,
"panels": [
{
"collapsed": false,
Expand Down Expand Up @@ -75,7 +75,7 @@
"content": "<h1>CPU<h1>",
"mode": "html"
},
"pluginVersion": "9.4.1",
"pluginVersion": "9.3.6",
"targets": [
{
"datasource": {
Expand Down Expand Up @@ -150,7 +150,7 @@
"text": {},
"textMode": "auto"
},
"pluginVersion": "9.4.1",
"pluginVersion": "9.3.6",
"targets": [
{
"datasource": {
Expand Down Expand Up @@ -213,7 +213,7 @@
"links": [],
"options": {
"colorMode": "background",
"graphMode": "area",
"graphMode": "none",
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
Expand All @@ -224,7 +224,7 @@
"text": {},
"textMode": "auto"
},
"pluginVersion": "9.4.1",
"pluginVersion": "9.3.6",
"targets": [
{
"datasource": {
Expand Down Expand Up @@ -302,7 +302,7 @@
"text": {},
"textMode": "auto"
},
"pluginVersion": "9.4.1",
"pluginVersion": "9.3.6",
"targets": [
{
"datasource": {
Expand Down Expand Up @@ -415,7 +415,7 @@
"id": 70,
"options": {
"colorMode": "background",
"graphMode": "area",
"graphMode": "none",
"justifyMode": "auto",
"orientation": "vertical",
"reduceOptions": {
Expand All @@ -426,7 +426,7 @@
"text": {},
"textMode": "auto"
},
"pluginVersion": "9.4.1",
"pluginVersion": "9.3.6",
"targets": [
{
"datasource": {
Expand Down Expand Up @@ -489,7 +489,7 @@
"content": "<h1>Memory<h1>",
"mode": "html"
},
"pluginVersion": "9.4.1",
"pluginVersion": "9.3.6",
"targets": [
{
"datasource": {
Expand Down Expand Up @@ -550,7 +550,7 @@
"text": {},
"textMode": "auto"
},
"pluginVersion": "9.4.1",
"pluginVersion": "9.3.6",
"targets": [
{
"datasource": {
Expand Down Expand Up @@ -826,7 +826,7 @@
"text": {},
"textMode": "auto"
},
"pluginVersion": "9.4.1",
"pluginVersion": "9.3.6",
"targets": [
{
"datasource": {
Expand Down Expand Up @@ -997,7 +997,7 @@
"text": {},
"textMode": "auto"
},
"pluginVersion": "9.4.1",
"pluginVersion": "9.3.6",
"targets": [
{
"datasource": {
Expand Down Expand Up @@ -1085,7 +1085,8 @@
"mode": "absolute",
"steps": [
{
"color": "rgb(128, 128, 128)"
"color": "rgb(128, 128, 128)",
"value": null
},
{
"color": "dark-green",
Expand Down Expand Up @@ -1180,7 +1181,8 @@
"mode": "absolute",
"steps": [
{
"color": "green"
"color": "green",
"value": null
},
{
"color": "red",
Expand Down Expand Up @@ -1279,6 +1281,7 @@
"step": 1
}
],
"timeFrom": "12h",
"title": "I/O ",
"transparent": true,
"type": "timeseries"
Expand Down Expand Up @@ -1355,7 +1358,8 @@
"mode": "absolute",
"steps": [
{
"color": "purple"
"color": "purple",
"value": null
}
]
},
Expand Down Expand Up @@ -1504,6 +1508,7 @@
}
],
"thresholds": [],
"timeFrom": "1h",
"timeRegions": [],
"tooltip": {
"msResolution": true,
Expand All @@ -1520,12 +1525,14 @@
},
"yaxes": [
{
"$$hashKey": "object:41",
"format": "bps",
"logBase": 1,
"min": 0,
"show": true
},
{
"$$hashKey": "object:42",
"format": "short",
"logBase": 1,
"show": false
Expand All @@ -1535,6 +1542,40 @@
"align": false
}
},
{
"datasource": {
"type": "prometheus",
"uid": "PBFA97CFB590B2093"
},
"gridPos": {
"h": 2,
"w": 24,
"x": 0,
"y": 55
},
"id": 78,
"options": {
"code": {
"language": "plaintext",
"showLineNumbers": false,
"showMiniMap": false
},
"content": "<h3>Transmit Bytes<h3>",
"mode": "html"
},
"pluginVersion": "9.3.6",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "PBFA97CFB590B2093"
},
"refId": "A"
}
],
"transparent": true,
"type": "text"
},
{
"datasource": {
"type": "prometheus",
Expand All @@ -1548,7 +1589,8 @@
"mode": "absolute",
"steps": [
{
"color": "rgb(128, 128, 128)"
"color": "rgb(128, 128, 128)",
"value": null
},
{
"color": "dark-purple",
Expand All @@ -1564,7 +1606,7 @@
"h": 4,
"w": 24,
"x": 0,
"y": 55
"y": 57
},
"id": 72,
"options": {
Expand All @@ -1587,15 +1629,51 @@
"type": "prometheus",
"uid": "PBFA97CFB590B2093"
},
"editorMode": "code",
"expr": "sum(rate(container_network_transmit_bytes_total{image!=\"\"}[1m])) by (name)",
"interval": "",
"legendFormat": "{{ name }}",
"range": true,
"refId": "A"
}
],
"transparent": true,
"type": "stat"
},
{
"datasource": {
"type": "prometheus",
"uid": "PBFA97CFB590B2093"
},
"gridPos": {
"h": 2,
"w": 24,
"x": 0,
"y": 61
},
"id": 79,
"options": {
"code": {
"language": "plaintext",
"showLineNumbers": false,
"showMiniMap": false
},
"content": "<h3>Bytes Received<h3>",
"mode": "html"
},
"pluginVersion": "9.3.6",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "PBFA97CFB590B2093"
},
"refId": "A"
}
],
"transparent": true,
"type": "text"
},
{
"datasource": {
"type": "prometheus",
Expand All @@ -1609,7 +1687,8 @@
"mode": "absolute",
"steps": [
{
"color": "rgb(128, 128, 128)"
"color": "rgb(128, 128, 128)",
"value": null
},
{
"color": "dark-purple",
Expand All @@ -1625,7 +1704,7 @@
"h": 4,
"w": 24,
"x": 0,
"y": 59
"y": 63
},
"id": 71,
"options": {
Expand Down Expand Up @@ -1660,7 +1739,7 @@
],
"refresh": "10s",
"revision": 1,
"schemaVersion": 38,
"schemaVersion": 37,
"style": "dark",
"tags": ["system"],
"templating": {
Expand Down Expand Up @@ -1696,6 +1775,6 @@
"timezone": "browser",
"title": "System",
"uid": "h5LcytHGz",
"version": 1,
"version": 2,
"weekStart": ""
}
Loading

0 comments on commit c0c500e

Please sign in to comment.