-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
82 lines (55 loc) · 1.5 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
default: build
COMPOSE_FILE_DEV = docker-compose-dev.yml
IMAGE_NAME=bireme/iahx-controller
export APP_VER?=$(shell git describe --tags --long --always | sed 's/-g[a-z0-9]\{7\}//' | sed 's/-/\./')
TAG_LATEST=$(IMAGE_NAME):latest
## variable used in docker-compose for tag the build image
export IMAGE_TAG=$(IMAGE_NAME):$(APP_VER)
tag:
@echo "IMAGE TAG:" $(IMAGE_TAG)
## DEV shortcuts
dev_build:
@docker compose -f $(COMPOSE_FILE_DEV) build
dev_build_no_cache:
@docker compose -f $(COMPOSE_FILE_DEV) build --no-cache
dev_run:
@docker compose -f $(COMPOSE_FILE_DEV) up
dev_start:
@docker compose -f $(COMPOSE_FILE_DEV) up -d
dev_rm:
@docker compose -f $(COMPOSE_FILE_DEV) rm -f
dev_logs:
@docker compose -f $(COMPOSE_FILE_DEV) logs -f
dev_stop:
@docker compose -f $(COMPOSE_FILE_DEV) stop
dev_down:
@docker compose -f $(COMPOSE_FILE_DEV) down
dev_sh:
@docker compose -f $(COMPOSE_FILE_DEV) exec iahx_controller bash
dev_cache_sh:
@docker compose -f $(COMPOSE_FILE_DEV) exec iahx_controller_cache bash
dev_import_decs_redis:
python controller/util/import_decs_redis.py
## PROD shortcuts
build:
@docker compose build
build_no_cache:
@docker compose build --no-cache
run:
@docker compose up
start:
@docker compose up -d
rm:
@docker compose rm -f
logs:
@docker compose logs -f
stop:
@docker compose stop
down:
@docker compose down
sh:
@docker compose exec iahx_controller bash
cache_sh:
@docker compose exec iahx_controller_cache bash
import_decs_redis:
python controller/util/import_decs_redis.py