forked from alexandre-abrioux/golem-node
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
54 lines (41 loc) · 1.3 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
SHELL := /bin/bash
.DEFAULT_GOAL := help
include .env
-include .env.local
export
.PHONY: help
help: ## Display this help message
@echo -e "$$(grep -hE '^\S+:.*##' $(MAKEFILE_LIST) | sed -e 's/:.*##\s*/:/' -e 's/^\(.\+\):\(.*\)/\\x1b[36m\1\\x1b[m:\2/' | column -c2 -t -s :)"
.PHONY: pull
pull: ## Pull the latest image version
docker-compose pull
.PHONY: up
up: ## Start the node
docker-compose up -d --remove-orphans
.PHONY: stop
stop: ## Stop the node
docker-compose stop
.PHONY: destroy
destroy: ## Destroy the node (volumes are not removed)
docker-compose down --remove-orphans
.PHONY: restart
restart: ## Restart the node
docker-compose restart
.PHONY: shell
shell: ## Enter the container shell
docker-compose exec node bash
.PHONY: logs
logs: ## Display the container logs
docker-compose logs -t --tail=10 -f node
.PHONY: setup
setup: ## Setup the node
docker-compose run --rm node golemsp setup
.PHONY: status
status: ## Get the running node status
docker-compose exec node golemsp status
.PHONY: settings
settings: ## Show the running node settings
docker-compose exec node golemsp settings show
.PHONY: clean
clean: ## Remove cached files older than 7 days
docker-compose exec node find /root/.local/share/ya-provider/exe-unit/cache/ -mtime +7 -type f -exec rm {} +