Skip to content

Commit

Permalink
big push to OSLabs (#143)
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelAngelo13 authored Mar 30, 2023
2 parents 6038cdb + 16c1fe7 commit 5b2e4f8
Show file tree
Hide file tree
Showing 129 changed files with 6,903 additions and 4,574 deletions.
4 changes: 4 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"presets": ["next/babel"],
"plugins": []
}
4 changes: 4 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
POSTGRES_PORT=5432
POSTGRES_NAME=docketeer-db
POSTGRES_USER=postgres
POSTGRES_PASS=postgres
126 changes: 64 additions & 62 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,62 +1,64 @@
// module.exports = {
// env: {
// browser: true,
// commonjs: true,
// es2021: true,
// node: true,
// },
// plugins: ['react', '@typescript-eslint'],
// extends: [
// 'eslint:recommended',
// 'plugin:react/recommended',
// 'plugin:@typescript-eslint/recommended',
// ],
// ignorePatterns: ['.eslintrc.js', '*.config.js', 'dist/*', '__tests__/*'],
// overrides: [],
// parserOptions: {
// ecmaVersion: 12,
// sourceType: 'module',
// },
// settings: {
// react: {
// version: 'detect',
// },
// },
// rules: {
// indent: ['warn', 2],
// 'no-unused-vars': ['off', { vars: 'local' }],
// 'prefer-const': 'warn',
// quotes: ['warn', 'single'],
// semi: ['warn', 'always'],
// 'space-infix-ops': 'warn',
// 'no-console': 'off',
// 'no-restricted-syntax': [
// 'error',
// {
// selector:
// "CallExpression[callee.object.name='console'][callee.property.name!=/^(log|warn|error|info|trace)$/]",
// message: 'Unexpected property on console object was called',
// },
// ],
// 'spaced-comment': [
// 'error',
// 'always',
// {
// line: {
// markers: ['/'],
// exceptions: ['-', '+'],
// },
// block: {
// markers: ['!'],
// exceptions: ['*'],
// balanced: true,
// },
// },
// ],
//
// // ---- TYPESCRIPT ---- //
// '@typescript-eslint/explicit-function-return-type': 'off',
// '@typescript-eslint/no-unused-vars': 'error',
// '@typescript-eslint/semi': ['warn', 'always'],
// },
// };
module.exports = {
env: {
browser: true,
commonjs: true,
es2021: true,
node: true,
},
plugins: ['react', '@typescript-eslint'],
extends: [
'eslint:recommended',
'plugin:react/recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react-hooks/recommended',
],
ignorePatterns: ['.eslintrc.js', '*.config.js', 'dist/*', '__tests__/*'],
overrides: [],
parserOptions: {
ecmaVersion: 12,
sourceType: 'module',
},
settings: {
react: {
version: 'detect',
},
},
rules: {
indent: ['warn', 2],
'no-unused-vars': ['off', { vars: 'local' }],
'prefer-const': 'warn',
quotes: ['warn', 'single'],
semi: ['warn', 'always'],
'space-infix-ops': 'warn',
'no-console': 'off',
'no-restricted-syntax': [
'error',
{
selector:
"CallExpression[callee.object.name='console'][callee.property.name!=/^(log|warn|error|info|trace)$/]",
message: 'Unexpected property on console object was called',
},
],
'spaced-comment': [
'error',
'always',
{
line: {
markers: ['/'],
exceptions: ['-', '+'],
},
block: {
markers: ['!'],
exceptions: ['*'],
balanced: true,
},
},
],

// ---- TYPESCRIPT ---- //
// '@typescript-eslint/no-explicit-any': ['error'],
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-unused-vars': 'error',
'@typescript-eslint/semi': ['warn', 'always'],
},
};
8 changes: 3 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,10 @@ yarn.lock
src/database/docketeerdb
server/database/docketeerdb
dist/
.env
/imageConfigs/grafana/data
/imageConfigs/prometheus/promData
/imageConfigs/postgres/docketeerdb

coverage/

out/
docketeerdb
docketeerdb
imageConfigs/grafana/data/
imageConfigs/grafana/data/grafana.db
7 changes: 4 additions & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"editor.formatOnSave": true,
"editor.formatOnPaste": true,
"editor.formatOnType": true,
"editor.codeActionsOnSave": {
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
}
}
},
"editor.acceptSuggestionOnEnter": "off"
}
Binary file added assets/dlogo-no-bg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
95 changes: 95 additions & 0 deletions docker-compose-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
version: '3.8'
services:
db:
container_name: docketeerdb
image: docketeerxi/postgres
restart: always
ports:
- '${POSTGRES_PORT}:5432'
volumes:
- ./imageConfigs/postgres/docketeerdb:/var/lib/postgresql/data/

environment:
POSTGRES_DB: ${POSTGRES_NAME}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASS}

cadvisor:
image: gcr.io/cadvisor/cadvisor:v0.47.1
container_name: cadvisor
ports:
- '8080:8080'

volumes:
- /:/rootfs:ro
- /var/run/docker.sock:/var/run/docker.sock:rw
- /sys:/sys:ro
- /var/lib/docker/:/var/lib/docker:ro
- /etc/machine-id:/etc/machine-id:ro

labels:
org_prometheus_starter: 'true'
org_prometheus_starter_path: '/metrics'

node-exporter:
image: docketeerxi/nodeex
container_name: node-exporter
ports:
- '9100:9100'
volumes:
#system info for linux machines
- /proc:/host/proc:ro
# also for linux
- /sys:/host/sys:ro
#root
- /:/rootfs:ro
depends_on:
- db

prometheus:
image: docketeerxi/prometheus
container_name: prometheus
ports:
- '9090:9090'

#can add volume here to persist the prometheus data.
depends_on:
- node-exporter
labels:
org_prometheus_starter: 'true'
org_prometheus_starter_port: '9090'
org_prometheus_starter_path: '/metrics'

grafana:
image: grafana/grafana:latest
container_name: grafana
ports:
- 2999:3000
environment:
GF_PATHS_CONFIG: /etc/grafana/grafana.ini
GF_AUTH_ANONYMOUS_ENABLED: 'true'

volumes:
- ./imageConfigs/grafana/data:/var/lib/grafana
- ./imageConfigs/grafana/provisioning/dashboards:/etc/grafana/provisioning/dashboards
- ./imageConfigs/grafana/provisioning/datasources:/etc/grafana/provisioning/datasources
- ./imageConfigs/grafana/grafana.ini:/etc/grafana/grafana.ini
- ./imageConfigs/grafana/plugins:/var/lib/grafana/plugins

depends_on:
- prometheus
dev:
image: docketeerxi/docketeer-dev
container_name: docketeer-dev
build:
dockerfile: dockerfile-dev
ports:
- 4000:4000
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./:/app
- node_modules:/app/node_modules
command: npm run dev

volumes:
node_modules:
45 changes: 38 additions & 7 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,23 @@ version: '3.8'
services:
db:
container_name: docketeerdb
image: docketeerx/postgres
image: docketeerxi/postgres
restart: always
ports:
- 5432:5432
volumes:
- ./imageConfigs/postgres/docketeerdb:/var/lib/postgresql/data/

environment:
POSTGRES_DB: 'docketeer-db'
POSTGRES_USER: 'postgres'
POSTGRES_PASSWORD: 'postgres'
POSTGRES_DB: ${POSTGRES_NAME}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASS}

# networks:
# - my-network

# networks:
# - my-network

cadvisor:
image: gcr.io/cadvisor/cadvisor:v0.47.1
Expand All @@ -31,8 +37,11 @@ services:
org_prometheus_starter: 'true'
org_prometheus_starter_path: '/metrics'

# networks:
# - my-network

node-exporter:
image: docketeerx/nodeex
image: docketeerxi/nodeex
container_name: node-exporter
ports:
- '9100:9100'
Expand All @@ -45,9 +54,11 @@ services:
- /:/rootfs:ro
depends_on:
- db
# networks:
# - my-network

prometheus:
image: docketeerx/prometheus
image: docketeerxi/prometheus
container_name: prometheus
ports:
- '9090:9090'
Expand All @@ -59,6 +70,8 @@ services:
org_prometheus_starter: 'true'
org_prometheus_starter_port: '9090'
org_prometheus_starter_path: '/metrics'
# networks:
# - my-network

grafana:
image: grafana/grafana:latest
Expand All @@ -76,13 +89,31 @@ services:
- ./imageConfigs/grafana/grafana.ini:/etc/grafana/grafana.ini
- ./imageConfigs/grafana/plugins:/var/lib/grafana/plugins

# networks:
# - my-network

depends_on:
- prometheus

docketeer:
image: docketeerx/docketeer
image: docketeerxi/docketeer
container_name: docketeer
ports:
- 4000:4000
- 3000:3000
volumes:
- /var/run/docker.sock:/var/run/docker.sock
command: npm run dev
# networks:
# - my-network
# depends_on:
# - grafana

# networks:
# my-network:
# driver: bridge
# driver_opts:
# com.docker.network.bridge.name: my-bridge
# com.docker.network.bridge.enable_icc: "true"
# subnet: "172.16.238.0/24"
# gateway: "172.16.238.1"
4 changes: 1 addition & 3 deletions dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@ COPY . .

# Make port 4000 available to the world outside this container
EXPOSE 4000
# EXPOSE 3000

# Start the app
CMD ["npm", "start"]



Loading

0 comments on commit 5b2e4f8

Please sign in to comment.