forked from rekibnikufesin/nodejs-logging-elk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
35 lines (30 loc) · 1.04 KB
/
Makefile
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
## up: bring the Express server and logging environment online using docker compose
.PHONY: up
up:
@echo '🔥 bringing environment up'
docker-compose up -d --build
## down: shutdown the environment but persist data for next time
.PHONY: down
down:
@echo '🛑 shutting down environment, data is preserved'
docker-compose down
## destroy: shutdown the environment and remove all saved data
.PHONY: destroy
destroy:
@echo '💣 shutting down environment and destroying data'
docker-compose down -v
## migrate: migrate the database to the latest schema
.PHONY: migrate
migrate:
@echo '🛠 migrating database schema'
docker exec expressjs ./node_modules/.bin/knex migrate:latest
## rollback_schema: rollback the database schema
.PHONY: rollback_schema
rollback_schema:
@echo '🛠 rolling back db schema'
docker exec expressjs ./node_modules/.bin/knex migrate:rollback
## seed: seed the database with data for development
.PHONY: seed
seed:
@echo '🌱 seeding database with development data'
docker exec expressjs ./node_modules/.bin/knex seed:run