Skip to content

Commit 16c1fe7

Browse files
author
Ben Huang
committed
completed OSLabs merge
2 parents 556b3b7 + 6038cdb commit 16c1fe7

File tree

19 files changed

+232
-115
lines changed

19 files changed

+232
-115
lines changed

config.js

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import dotenv from 'dotenv';
2+
dotenv.config();
3+
4+
export const POSTGRES_NAME = process.env.DB_NAME
5+
? process.env.DB_CONTAINER_NAME
6+
: 'docketeer-db';
7+
8+
export const POSTGRES_USER = process.env.DB_USER
9+
? process.env.DB_USER
10+
: 'postgres';
11+
export const POSTGRES_PASS = process.env.DB_PASS
12+
? process.env.DB_PASS
13+
: 'postgres';
14+
export const POSTGRES_SERVICE = process.env.DB_SERVICE_NAME
15+
? process.env.DB_SERVICE_NAME
16+
: 'db';
17+
export const JWT_SECRET = process.env.JWT_SECRET
18+
? process.env.JWT_SECRET
19+
: 'fced686ad3297c774a7c635cc3d7d33421ec0f557fda29510c6c8b7a95736dc36da9064e1fa6963f0069a29a9c1a62d799ce667dece4f3aafe9449aaed2b2302';
20+
21+
export const DASHBOARD_PORT = process.env.REACT_DASHBOARD_PORT
22+
? Number(process.env.DASHBOARD_PORT)
23+
: 2999;
24+
export const DASHBOARD_UID = process.env.REACT_REACT_DASHBOARD_ORG_ID
25+
? Number(process.env.DASHBOARD_ORG_ID)
26+
: 1;

docker-compose.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ services:
55
image: docketeerxi/postgres
66
restart: always
77
ports:
8-
- '${POSTGRES_PORT}:5432'
8+
- 5432:5432
99
volumes:
1010
- ./imageConfigs/postgres/docketeerdb:/var/lib/postgresql/data/
1111

@@ -17,6 +17,9 @@ services:
1717
# networks:
1818
# - my-network
1919

20+
# networks:
21+
# - my-network
22+
2023
cadvisor:
2124
image: gcr.io/cadvisor/cadvisor:v0.47.1
2225
container_name: cadvisor
@@ -59,8 +62,8 @@ services:
5962
container_name: prometheus
6063
ports:
6164
- '9090:9090'
62-
63-
#can add volume here to persist the prometheus data.
65+
volumes:
66+
- ./imageConfigs/prometheus/promData:/prometheus
6467
depends_on:
6568
- node-exporter
6669
labels:

dockerfile

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,18 @@ FROM node
33
# Set the working directory to /app
44
WORKDIR /app
55

6-
COPY package*.json ./
7-
8-
# Run npm install to install app dependencies
9-
RUN npm install
10-
11-
# Set the PATH env variable
12-
# ENV PATH="/usr/local/bin:${PATH}"
13-
# COPY /usr/local/bin/docker /usr/local/bin/docker
146
ENV DOCKERVERSION=19.03.12
7+
158
RUN curl -fsSLO https://download.docker.com/linux/static/stable/x86_64/docker-${DOCKERVERSION}.tgz \
169
&& tar xzvf docker-${DOCKERVERSION}.tgz --strip 1 -C /usr/local/bin docker/docker \
1710
&& rm docker-${DOCKERVERSION}.tgz
1811

12+
13+
COPY package*.json ./
14+
15+
# Run npm install to install app dependencies
16+
RUN npm install
17+
1918
# Copy the current directory contents into the container at /app
2019
COPY . .
2120

20 KB
Binary file not shown.

imageConfigs/grafana/provisioning/dashboards/dashboard.json

Lines changed: 98 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
"content": "<h1>CPU<h1>",
7676
"mode": "html"
7777
},
78-
"pluginVersion": "9.4.1",
78+
"pluginVersion": "9.4.3",
7979
"targets": [
8080
{
8181
"datasource": {
@@ -150,7 +150,7 @@
150150
"text": {},
151151
"textMode": "auto"
152152
},
153-
"pluginVersion": "9.4.1",
153+
"pluginVersion": "9.4.3",
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.4.3",
228228
"targets": [
229229
{
230230
"datasource": {
@@ -302,7 +302,7 @@
302302
"text": {},
303303
"textMode": "auto"
304304
},
305-
"pluginVersion": "9.4.1",
305+
"pluginVersion": "9.4.3",
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.4.3",
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.4.3",
493493
"targets": [
494494
{
495495
"datasource": {
@@ -550,7 +550,7 @@
550550
"text": {},
551551
"textMode": "auto"
552552
},
553-
"pluginVersion": "9.4.1",
553+
"pluginVersion": "9.4.3",
554554
"targets": [
555555
{
556556
"datasource": {
@@ -826,7 +826,7 @@
826826
"text": {},
827827
"textMode": "auto"
828828
},
829-
"pluginVersion": "9.4.1",
829+
"pluginVersion": "9.4.3",
830830
"targets": [
831831
{
832832
"datasource": {
@@ -997,7 +997,7 @@
997997
"text": {},
998998
"textMode": "auto"
999999
},
1000-
"pluginVersion": "9.4.1",
1000+
"pluginVersion": "9.4.3",
10011001
"targets": [
10021002
{
10031003
"datasource": {
@@ -1059,7 +1059,7 @@
10591059
"content": "<h1>Disk<h1>",
10601060
"mode": "html"
10611061
},
1062-
"pluginVersion": "9.3.6",
1062+
"pluginVersion": "9.4.3",
10631063
"targets": [
10641064
{
10651065
"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",
@@ -1117,7 +1118,7 @@
11171118
"text": {},
11181119
"textMode": "auto"
11191120
},
1120-
"pluginVersion": "9.3.6",
1121+
"pluginVersion": "9.4.3",
11211122
"targets": [
11221123
{
11231124
"datasource": {
@@ -1180,7 +1181,8 @@
11801181
"mode": "absolute",
11811182
"steps": [
11821183
{
1183-
"color": "green"
1184+
"color": "green",
1185+
"value": null
11841186
},
11851187
{
11861188
"color": "red",
@@ -1329,7 +1331,7 @@
13291331
"content": "<h1>Network<h1>",
13301332
"mode": "html"
13311333
},
1332-
"pluginVersion": "9.3.6",
1334+
"pluginVersion": "9.4.3",
13331335
"targets": [
13341336
{
13351337
"datasource": {
@@ -1355,7 +1357,8 @@
13551357
"mode": "absolute",
13561358
"steps": [
13571359
{
1358-
"color": "purple"
1360+
"color": "purple",
1361+
"value": null
13591362
}
13601363
]
13611364
},
@@ -1384,7 +1387,7 @@
13841387
"text": {},
13851388
"textMode": "auto"
13861389
},
1387-
"pluginVersion": "9.3.6",
1390+
"pluginVersion": "9.4.3",
13881391
"targets": [
13891392
{
13901393
"datasource": {
@@ -1467,7 +1470,7 @@
14671470
"alertThreshold": true
14681471
},
14691472
"percentage": false,
1470-
"pluginVersion": "9.3.6",
1473+
"pluginVersion": "9.4.3",
14711474
"pointradius": 5,
14721475
"points": false,
14731476
"renderer": "flot",
@@ -1535,6 +1538,40 @@
15351538
"align": false
15361539
}
15371540
},
1541+
{
1542+
"datasource": {
1543+
"type": "prometheus",
1544+
"uid": "PBFA97CFB590B2093"
1545+
},
1546+
"gridPos": {
1547+
"h": 2,
1548+
"w": 24,
1549+
"x": 0,
1550+
"y": 55
1551+
},
1552+
"id": 78,
1553+
"options": {
1554+
"code": {
1555+
"language": "plaintext",
1556+
"showLineNumbers": false,
1557+
"showMiniMap": false
1558+
},
1559+
"content": "<h3>Transmitted<h3>",
1560+
"mode": "html"
1561+
},
1562+
"pluginVersion": "9.4.3",
1563+
"targets": [
1564+
{
1565+
"datasource": {
1566+
"type": "prometheus",
1567+
"uid": "PBFA97CFB590B2093"
1568+
},
1569+
"refId": "A"
1570+
}
1571+
],
1572+
"transparent": true,
1573+
"type": "text"
1574+
},
15381575
{
15391576
"datasource": {
15401577
"type": "prometheus",
@@ -1548,7 +1585,8 @@
15481585
"mode": "absolute",
15491586
"steps": [
15501587
{
1551-
"color": "rgb(128, 128, 128)"
1588+
"color": "rgb(128, 128, 128)",
1589+
"value": null
15521590
},
15531591
{
15541592
"color": "dark-purple",
@@ -1564,7 +1602,7 @@
15641602
"h": 4,
15651603
"w": 24,
15661604
"x": 0,
1567-
"y": 55
1605+
"y": 57
15681606
},
15691607
"id": 72,
15701608
"options": {
@@ -1580,7 +1618,7 @@
15801618
"text": {},
15811619
"textMode": "auto"
15821620
},
1583-
"pluginVersion": "9.3.6",
1621+
"pluginVersion": "9.4.3",
15841622
"targets": [
15851623
{
15861624
"datasource": {
@@ -1596,6 +1634,40 @@
15961634
"transparent": true,
15971635
"type": "stat"
15981636
},
1637+
{
1638+
"datasource": {
1639+
"type": "prometheus",
1640+
"uid": "PBFA97CFB590B2093"
1641+
},
1642+
"gridPos": {
1643+
"h": 2,
1644+
"w": 24,
1645+
"x": 0,
1646+
"y": 61
1647+
},
1648+
"id": 79,
1649+
"options": {
1650+
"code": {
1651+
"language": "plaintext",
1652+
"showLineNumbers": false,
1653+
"showMiniMap": false
1654+
},
1655+
"content": "<h3>Received<h3>",
1656+
"mode": "html"
1657+
},
1658+
"pluginVersion": "9.4.3",
1659+
"targets": [
1660+
{
1661+
"datasource": {
1662+
"type": "prometheus",
1663+
"uid": "PBFA97CFB590B2093"
1664+
},
1665+
"refId": "A"
1666+
}
1667+
],
1668+
"transparent": true,
1669+
"type": "text"
1670+
},
15991671
{
16001672
"datasource": {
16011673
"type": "prometheus",
@@ -1609,7 +1681,8 @@
16091681
"mode": "absolute",
16101682
"steps": [
16111683
{
1612-
"color": "rgb(128, 128, 128)"
1684+
"color": "rgb(128, 128, 128)",
1685+
"value": null
16131686
},
16141687
{
16151688
"color": "dark-purple",
@@ -1625,7 +1698,7 @@
16251698
"h": 4,
16261699
"w": 24,
16271700
"x": 0,
1628-
"y": 59
1701+
"y": 63
16291702
},
16301703
"id": 71,
16311704
"options": {
@@ -1641,7 +1714,7 @@
16411714
"text": {},
16421715
"textMode": "auto"
16431716
},
1644-
"pluginVersion": "9.3.6",
1717+
"pluginVersion": "9.4.3",
16451718
"targets": [
16461719
{
16471720
"datasource": {

0 commit comments

Comments
 (0)