-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
21 lines (15 loc) · 1003 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
start: ## Start all containers
docker-compose up
start-background: ## Start all containers
docker-compose up -d
restoreDb: ## Restore Db to make exercise
docker run --interactive --tty --rm --publish=7474:7474 --publish=7687:7687 --volume=${PWD}/data:/data --volume=${PWD}/import:/import --user="$(id -u):$(id -g)" neo4j:4.4-community neo4j-admin load --from=/import/mdas-neo4j-exercise.dump --database=neo4j --force
dumpDb: ## Make a Backup Db
docker run --interactive --tty --rm --publish=7474:7474 --publish=7687:7687 --volume=${PWD}/data:/data --volume=${PWD}/import:/import --user="$(id -u):$(id -g)" neo4j:4.4-community neo4j-admin dump --database=neo4j --to=/import/mdas-neo4j-exercise.dump
stop: ## Stop Conainers
docker-compose stop
clean: ## Clean everything
docker-compose down -v
rm -fr data