-
Notifications
You must be signed in to change notification settings - Fork 135
/
Makefile
40 lines (29 loc) · 1.13 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
# Host Makefile.
include Makefile.include
ifeq ($(PROFILES),)
PROFILES := 'pmm'
endif
env-up: ## Start devcontainer
COMPOSE_PROFILES=$(PROFILES) \
docker compose up -d
env-up-rebuild: env-update-image ## Rebuild and start devcontainer. Useful for custom $PMM_SERVER_IMAGE
COMPOSE_PROFILES=$(PROFILES) \
docker compose up --build -d
env-update-image: ## Pull latest dev image
COMPOSE_PROFILES=$(PROFILES) \
docker compose pull
env-compose-up: env-update-image
COMPOSE_PROFILES=$(PROFILES) \
docker compose up --detach --renew-anon-volumes --remove-orphans --wait --wait-timeout 100
env-devcontainer:
docker exec -it --workdir=/root/go/src/github.com/percona/pmm pmm-server .devcontainer/setup.py
env-down: ## Stop devcontainer
COMPOSE_PROFILES=$(PROFILES) \
docker compose down --remove-orphans
env-remove:
COMPOSE_PROFILES=$(PROFILES) \
docker compose down --volumes --remove-orphans
TARGET ?= _bash
env: ## Run `make TARGET` in devcontainer (`make env TARGET=help`); TARGET defaults to bash
COMPOSE_PROFILES=$(PROFILES) \
docker exec -it --workdir=/root/go/src/github.com/percona/pmm pmm-server make $(TARGET)