Skip to content

Commit

Permalink
feat: adding monitoring to project
Browse files Browse the repository at this point in the history
  - Adding prometheus and grafana do docker-compose
  - Adding swagger stats and api to project
  • Loading branch information
lucsimao committed Oct 19, 2021
1 parent 1c20901 commit e2277f9
Show file tree
Hide file tree
Showing 21 changed files with 13,737 additions and 854 deletions.
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
npm-debug.log
3 changes: 2 additions & 1 deletion .env-test
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
GITHUB_TOKEN = 'myToken'
DATABASE_ADDRESS = 'localhost'
DATABASE_ADDRESS = 'mongodb'
DATABASE_USERNAME = 'root'
DATABASE_PASSWORD = 'my_password'
DATABASE_PORT = 27017
LOGGER_ENABLED = true

15 changes: 15 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM node:alpine as builder

WORKDIR /usr/app

COPY package*.json ./
RUN npm i

COPY . .

RUN npm run build


EXPOSE 8080

CMD ["npm", "start"]
11 changes: 11 additions & 0 deletions config/alertmanager/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
route:
receiver: 'slack'

receivers:
- name: 'slack'
slack_configs:
- send_resolved: true
text: '{{ .CommonAnnotations.description }}'
username: 'Prometheus'
channel: '#prometheus'
api_url: 'https://hooks.slack.com/services/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'
12 changes: 12 additions & 0 deletions config/grafana/provisioning/dashboards/dashboard.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: 1

providers:
- name: 'Prometheus'
orgId: 1
folder: ''
type: file
disableDeletion: false
editable: true
allowUiUpdates: true
options:
path: /etc/grafana/provisioning/dashboards
Loading

0 comments on commit e2277f9

Please sign in to comment.