-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
56 lines (43 loc) · 1.07 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
#* Variables
SERVICES:=
SERVICE:=
CMD:=
ARGS:=
TIMEOUT:=90
# https://github.com/containers/podman-compose/issues/491#issuecomment-1289944841
CONTAINER_APP=docker compose \
--env-file=.env \
--file docker/compose.yaml
include .env
# -- Project --
.PHONY: env
env:
envsubst < env.tpl > .env
.PHONY: linter
linter:
pre-commit run --all-files --verbose
# -- Docker --
containers-build:
set -e
$(CONTAINER_APP) build ${SERVICES}
containers-start:
set -ex
$(CONTAINER_APP) up --remove-orphans -d ${SERVICES}
containers-stop:
set -ex
$(CONTAINER_APP) stop ${ARGS} ${SERVICES}
containers-rm:
set -ex
$(CONTAINER_APP) rm ${ARGS} ${SERVICES}
containers-restart: containers-stop containers-start
containers-down:
$(CONTAINER_APP) down ${ARGS}
containers-logs:
$(CONTAINER_APP) logs ${ARGS} ${SERVICES}
containers-wait:
timeout ${TIMEOUT} docker/scripts/healthcheck.sh ${SERVICE}
containers-wait-all:
$(MAKE) containers-wait SERVICE="scheduler"
$(MAKE) containers-wait SERVICE="triggerer"
$(MAKE) containers-wait SERVICE="webserver"
$(MAKE) containers-wait SERVICE="worker"