-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
45 lines (34 loc) · 964 Bytes
/
Makefile
File metadata and controls
45 lines (34 loc) · 964 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
.PHONY: run migrate-db rollback-db import-dashboard stop restart build rebuild logs cli test
# Run docker containers
run:
docker-compose up -d
# Run database migrations
migrate-db:
npx knex migrate:latest
# Rollback database migrations
rollback-db:
npx knex migrate:rollback
# Import GitHub Users dashboard to Kibana
import-dashboard:
curl -X POST "http://localhost:5601/api/saved_objects/_import?overwrite=true" -H "kbn-xsrf: true" -F "file=@conf/kibana/dashboard.ndjson"
# Stop docker containers
stop:
docker-compose down
# Restart docker containers
restart:
make stop && make run
# Build the project
build:
npm install && npm run build && cp .env dist/ && docker-compose build
# Rebuild the project
rebuild:
make stop && rm -rf node_modules && rm -rf dist && make build
# Monitor web server logs
logs: run
docker-compose logs -f web
# Run CLI commands
cli:
docker-compose up -d db && node dist/cli.js
# Run tests
test: stop build
npm test