-
Notifications
You must be signed in to change notification settings - Fork 44
Expand file tree
/
Copy pathMakefile
More file actions
31 lines (23 loc) · 997 Bytes
/
Makefile
File metadata and controls
31 lines (23 loc) · 997 Bytes
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
.PHONY: check-env-file \
infra-up infra-stop \
build-services services-up services-stop
DOCKER_PARALLEL ?= 4
check-env-file:
@if [ ! -f "./.env.compose.local" ]; then \
cp ./.env.compose ./.env.compose.local ; \
fi
infra-up: check-env-file
@docker compose --env-file .env.compose.local up -d postgres redis minio minio-client
infra-stop:
@docker compose --env-file .env.compose.local stop postgres redis minio minio-client
build-services: check-env-file
@docker compose --env-file .env.compose.local --parallel $(DOCKER_PARALLEL) up --no-start
services-up: check-env-file
@service_names="$(wordlist 2, $(words $(MAKECMDGOALS)), $(MAKECMDGOALS))"; \
docker compose --env-file .env.compose.local --parallel $(DOCKER_PARALLEL) up -d $$service_names
services-stop:
@service_names="$(wordlist 2, $(words $(MAKECMDGOALS)), $(MAKECMDGOALS))"; \
docker compose --env-file .env.compose.local stop $$service_names
# catch-all and noop; to avoid warnings when using MAKECMDGOALS
%:
@: