forked from cristianpb/telegraf-influxdb-grafana-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
42 lines (32 loc) · 807 Bytes
/
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
# The Makefile defines all builds/tests steps
# we run outside the CI. include .env file
include .env
export GPU
ifeq ($(GPU),1)
export COMPOSE:=docker-compose -f docker-compose.yml -f docker-compose-gpu.yml
endif
# compose command to merge production file and and dev/tools overrides
COMPOSE?=docker-compose -f docker-compose.yml
.env:
cp .env_dist .env
up: .env
# run compose in background
$(COMPOSE) up -d
dev: .env
# run compose in foreground
$(COMPOSE) up
down:
# stop compose
#$(COMPOSE) down --remove-orphans
$(COMPOSE) down
logs:
$(COMPOSE) logs --tail 50 -f
clean:
# clean local folders
rm -Rf influxdb-data
# remove docker stuff
$(COMPOSE) rm --stop --force
# clean docker volumes
docker volume prune -f || true
# clean docker networks
docker network prune -f || true