Skip to content

Commit c0c500e

Browse files
committed
Removed unnecessary env variables and updated dashboard json to its most recent state
1 parent e463c89 commit c0c500e

File tree

4 files changed

+114
-47
lines changed

4 files changed

+114
-47
lines changed

config.js

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,18 @@
11
import dotenv from 'dotenv';
22
dotenv.config();
33

4-
export const POSTGRES_HOST = process.env.POSTGRES_HOST
5-
? process.env.POSTGRES_HOST
6-
: 'localhost';
7-
export const POSTGRES_NAME = process.env.POSTGRES_NAME
8-
? process.env.POSTGRES_NAME
4+
export const POSTGRES_NAME = process.env.DB_NAME
5+
? process.env.DB_CONTAINER_NAME
96
: 'docketeer-db';
10-
export const POSTGRES_PORT = process.env.POSTGRES_PORT
11-
? Number(process.env.POSTGRES_PORT)
12-
: 5432;
13-
export const POSTGRES_USER = process.env.POSTGRES_USER
14-
? process.env.POSTGRES_USER
7+
8+
export const POSTGRES_USER = process.env.DB_USER
9+
? process.env.DB_USER
1510
: 'postgres';
16-
export const POSTGRES_PASS = process.env.POSTGRES_PASS
17-
? process.env.POSTGRES_PASS
11+
export const POSTGRES_PASS = process.env.DB_PASS
12+
? process.env.DB_PASS
1813
: 'postgres';
19-
export const POSTGRES_SERVICE = process.env.POSTGRES_NAME
20-
? process.env.POSTGRES_NAME
14+
export const POSTGRES_SERVICE = process.env.DB_SERVICE_NAME
15+
? process.env.DB_SERVICE_NAME
2116
: 'db';
2217
export const JWT_SECRET = process.env.JWT_SECRET
2318
? process.env.JWT_SECRET

docker-compose.yml

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ services:
1010
- ./imageConfigs/postgres/docketeerdb:/var/lib/postgresql/data/
1111

1212
environment:
13-
POSTGRES_DB: docketeer-db
14-
POSTGRES_USER: postgres
15-
POSTGRES_PASSWORD: postgres
13+
POSTGRES_DB: 'docketeer-db'
14+
POSTGRES_USER: 'postgres'
15+
POSTGRES_PASSWORD: 'postgres'
1616

1717
cadvisor:
1818
image: gcr.io/cadvisor/cadvisor:v0.47.1
@@ -51,7 +51,6 @@ services:
5151
container_name: prometheus
5252
ports:
5353
- '9090:9090'
54-
5554
volumes:
5655
- ./imageConfigs/prometheus/promData:/prometheus
5756
depends_on:
@@ -87,8 +86,3 @@ services:
8786
- 4000:4000
8887
volumes:
8988
- /var/run/docker.sock:/var/run/docker.sock
90-
91-
environment:
92-
POSTGRES_USER: 'postgres'
93-
depends_on:
94-
- db

imageConfigs/grafana/provisioning/dashboards/dashboard.json

Lines changed: 100 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"graphTooltip": 1,
2828
"id": 1,
2929
"links": [],
30-
"liveNow": false,
30+
"liveNow": true,
3131
"panels": [
3232
{
3333
"collapsed": false,
@@ -75,7 +75,7 @@
7575
"content": "<h1>CPU<h1>",
7676
"mode": "html"
7777
},
78-
"pluginVersion": "9.4.1",
78+
"pluginVersion": "9.3.6",
7979
"targets": [
8080
{
8181
"datasource": {
@@ -150,7 +150,7 @@
150150
"text": {},
151151
"textMode": "auto"
152152
},
153-
"pluginVersion": "9.4.1",
153+
"pluginVersion": "9.3.6",
154154
"targets": [
155155
{
156156
"datasource": {
@@ -213,7 +213,7 @@
213213
"links": [],
214214
"options": {
215215
"colorMode": "background",
216-
"graphMode": "area",
216+
"graphMode": "none",
217217
"justifyMode": "auto",
218218
"orientation": "auto",
219219
"reduceOptions": {
@@ -224,7 +224,7 @@
224224
"text": {},
225225
"textMode": "auto"
226226
},
227-
"pluginVersion": "9.4.1",
227+
"pluginVersion": "9.3.6",
228228
"targets": [
229229
{
230230
"datasource": {
@@ -302,7 +302,7 @@
302302
"text": {},
303303
"textMode": "auto"
304304
},
305-
"pluginVersion": "9.4.1",
305+
"pluginVersion": "9.3.6",
306306
"targets": [
307307
{
308308
"datasource": {
@@ -415,7 +415,7 @@
415415
"id": 70,
416416
"options": {
417417
"colorMode": "background",
418-
"graphMode": "area",
418+
"graphMode": "none",
419419
"justifyMode": "auto",
420420
"orientation": "vertical",
421421
"reduceOptions": {
@@ -426,7 +426,7 @@
426426
"text": {},
427427
"textMode": "auto"
428428
},
429-
"pluginVersion": "9.4.1",
429+
"pluginVersion": "9.3.6",
430430
"targets": [
431431
{
432432
"datasource": {
@@ -489,7 +489,7 @@
489489
"content": "<h1>Memory<h1>",
490490
"mode": "html"
491491
},
492-
"pluginVersion": "9.4.1",
492+
"pluginVersion": "9.3.6",
493493
"targets": [
494494
{
495495
"datasource": {
@@ -550,7 +550,7 @@
550550
"text": {},
551551
"textMode": "auto"
552552
},
553-
"pluginVersion": "9.4.1",
553+
"pluginVersion": "9.3.6",
554554
"targets": [
555555
{
556556
"datasource": {
@@ -826,7 +826,7 @@
826826
"text": {},
827827
"textMode": "auto"
828828
},
829-
"pluginVersion": "9.4.1",
829+
"pluginVersion": "9.3.6",
830830
"targets": [
831831
{
832832
"datasource": {
@@ -997,7 +997,7 @@
997997
"text": {},
998998
"textMode": "auto"
999999
},
1000-
"pluginVersion": "9.4.1",
1000+
"pluginVersion": "9.3.6",
10011001
"targets": [
10021002
{
10031003
"datasource": {
@@ -1085,7 +1085,8 @@
10851085
"mode": "absolute",
10861086
"steps": [
10871087
{
1088-
"color": "rgb(128, 128, 128)"
1088+
"color": "rgb(128, 128, 128)",
1089+
"value": null
10891090
},
10901091
{
10911092
"color": "dark-green",
@@ -1180,7 +1181,8 @@
11801181
"mode": "absolute",
11811182
"steps": [
11821183
{
1183-
"color": "green"
1184+
"color": "green",
1185+
"value": null
11841186
},
11851187
{
11861188
"color": "red",
@@ -1279,6 +1281,7 @@
12791281
"step": 1
12801282
}
12811283
],
1284+
"timeFrom": "12h",
12821285
"title": "I/O ",
12831286
"transparent": true,
12841287
"type": "timeseries"
@@ -1355,7 +1358,8 @@
13551358
"mode": "absolute",
13561359
"steps": [
13571360
{
1358-
"color": "purple"
1361+
"color": "purple",
1362+
"value": null
13591363
}
13601364
]
13611365
},
@@ -1504,6 +1508,7 @@
15041508
}
15051509
],
15061510
"thresholds": [],
1511+
"timeFrom": "1h",
15071512
"timeRegions": [],
15081513
"tooltip": {
15091514
"msResolution": true,
@@ -1520,12 +1525,14 @@
15201525
},
15211526
"yaxes": [
15221527
{
1528+
"$$hashKey": "object:41",
15231529
"format": "bps",
15241530
"logBase": 1,
15251531
"min": 0,
15261532
"show": true
15271533
},
15281534
{
1535+
"$$hashKey": "object:42",
15291536
"format": "short",
15301537
"logBase": 1,
15311538
"show": false
@@ -1535,6 +1542,40 @@
15351542
"align": false
15361543
}
15371544
},
1545+
{
1546+
"datasource": {
1547+
"type": "prometheus",
1548+
"uid": "PBFA97CFB590B2093"
1549+
},
1550+
"gridPos": {
1551+
"h": 2,
1552+
"w": 24,
1553+
"x": 0,
1554+
"y": 55
1555+
},
1556+
"id": 78,
1557+
"options": {
1558+
"code": {
1559+
"language": "plaintext",
1560+
"showLineNumbers": false,
1561+
"showMiniMap": false
1562+
},
1563+
"content": "<h3>Transmit Bytes<h3>",
1564+
"mode": "html"
1565+
},
1566+
"pluginVersion": "9.3.6",
1567+
"targets": [
1568+
{
1569+
"datasource": {
1570+
"type": "prometheus",
1571+
"uid": "PBFA97CFB590B2093"
1572+
},
1573+
"refId": "A"
1574+
}
1575+
],
1576+
"transparent": true,
1577+
"type": "text"
1578+
},
15381579
{
15391580
"datasource": {
15401581
"type": "prometheus",
@@ -1548,7 +1589,8 @@
15481589
"mode": "absolute",
15491590
"steps": [
15501591
{
1551-
"color": "rgb(128, 128, 128)"
1592+
"color": "rgb(128, 128, 128)",
1593+
"value": null
15521594
},
15531595
{
15541596
"color": "dark-purple",
@@ -1564,7 +1606,7 @@
15641606
"h": 4,
15651607
"w": 24,
15661608
"x": 0,
1567-
"y": 55
1609+
"y": 57
15681610
},
15691611
"id": 72,
15701612
"options": {
@@ -1587,15 +1629,51 @@
15871629
"type": "prometheus",
15881630
"uid": "PBFA97CFB590B2093"
15891631
},
1632+
"editorMode": "code",
15901633
"expr": "sum(rate(container_network_transmit_bytes_total{image!=\"\"}[1m])) by (name)",
15911634
"interval": "",
15921635
"legendFormat": "{{ name }}",
1636+
"range": true,
15931637
"refId": "A"
15941638
}
15951639
],
15961640
"transparent": true,
15971641
"type": "stat"
15981642
},
1643+
{
1644+
"datasource": {
1645+
"type": "prometheus",
1646+
"uid": "PBFA97CFB590B2093"
1647+
},
1648+
"gridPos": {
1649+
"h": 2,
1650+
"w": 24,
1651+
"x": 0,
1652+
"y": 61
1653+
},
1654+
"id": 79,
1655+
"options": {
1656+
"code": {
1657+
"language": "plaintext",
1658+
"showLineNumbers": false,
1659+
"showMiniMap": false
1660+
},
1661+
"content": "<h3>Bytes Received<h3>",
1662+
"mode": "html"
1663+
},
1664+
"pluginVersion": "9.3.6",
1665+
"targets": [
1666+
{
1667+
"datasource": {
1668+
"type": "prometheus",
1669+
"uid": "PBFA97CFB590B2093"
1670+
},
1671+
"refId": "A"
1672+
}
1673+
],
1674+
"transparent": true,
1675+
"type": "text"
1676+
},
15991677
{
16001678
"datasource": {
16011679
"type": "prometheus",
@@ -1609,7 +1687,8 @@
16091687
"mode": "absolute",
16101688
"steps": [
16111689
{
1612-
"color": "rgb(128, 128, 128)"
1690+
"color": "rgb(128, 128, 128)",
1691+
"value": null
16131692
},
16141693
{
16151694
"color": "dark-purple",
@@ -1625,7 +1704,7 @@
16251704
"h": 4,
16261705
"w": 24,
16271706
"x": 0,
1628-
"y": 59
1707+
"y": 63
16291708
},
16301709
"id": 71,
16311710
"options": {
@@ -1660,7 +1739,7 @@
16601739
],
16611740
"refresh": "10s",
16621741
"revision": 1,
1663-
"schemaVersion": 38,
1742+
"schemaVersion": 37,
16641743
"style": "dark",
16651744
"tags": ["system"],
16661745
"templating": {
@@ -1696,6 +1775,6 @@
16961775
"timezone": "browser",
16971776
"title": "System",
16981777
"uid": "h5LcytHGz",
1699-
"version": 1,
1778+
"version": 2,
17001779
"weekStart": ""
17011780
}

0 commit comments

Comments
 (0)