forked from sermatec-opensource/Sermatec-Inverter-Proxy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
25 lines (19 loc) · 766 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
SHELL:=/bin/bash
current_dir=$(shell pwd)
docker_network=$(shell docker network ls | grep "sermatec" | wc -l)
define create_network
if [[ $(docker_network) == 0 ]]; then docker network create sermatec; fi
endef
define remove_network
if [[ $(docker_network) == 1 ]]; then docker network rm sermatec; fi
endef
generate_env_file:
$(create_network)
touch $(current_dir)/application.private.env && \
cat $(current_dir)/application.example.env $(current_dir)/application.private.env > $(current_dir)/application.env
build: generate_env_file
docker compose -f docker-compose.yml build
help: build
docker compose -f docker-compose.yml run command-help
run-client-only: build
docker compose -f docker-compose.yml run runner-client-only