-
Notifications
You must be signed in to change notification settings - Fork 8
/
Makefile
25 lines (21 loc) · 1.54 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
ROOT_DIR = ..
include ${ROOT_DIR}/_scripts/Makefile.projects
include ${ROOT_DIR}/_scripts/Makefile.instance
.PHONY: config-hook
config-hook:
@${BIN}/reconfigure_ask ${ENV_FILE} MOPIDY_TRAEFIK_HOST "Enter the mopidy domain name" mopidy${INSTANCE_URL_SUFFIX}.${ROOT_DOMAIN}
@${BIN}/reconfigure_ask ${ENV_FILE} MOPIDY_MPD_IP_SOURCERANGE "Enter the MPD client IP sourcerange filters (CIDR ranges, comma separated)" 0.0.0.0/0
@${BIN}/reconfigure_ask ${ENV_FILE} MOPIDY_SNAPCAST_IP_SOURCERANGE "Enter the Snapcast audio client IP sourcerange filters (CIDR ranges, comma separated)" 0.0.0.0/0
@${BIN}/reconfigure_ask ${ENV_FILE} MOPIDY_SNAPCAST_CONTROL_IP_SOURCERANGE "Enter the Snapcast control client IP sourcerange filters (CIDR ranges, comma separated)" 0.0.0.0/0
@MOPIDY_MPD_PASSWORD=$$(${BIN}/dotenv -f ${ENV_FILE} get MOPIDY_MPD_PASSWORD); test -n "$${MOPIDY_MPD_PASSWORD}" || MOPIDY_MPD_PASSWORD=$$(openssl rand -hex 15); ${BIN}/reconfigure ${ENV_FILE} MOPIDY_MPD_PASSWORD="$${MOPIDY_MPD_PASSWORD}"
@echo
@echo "Set the MPD_HOST variable in your client's .profile or .bashrc file:"
@echo
@echo "export MPD_HOST=$$(${BIN}/dotenv -f ${ENV_FILE} get MOPIDY_MPD_PASSWORD)@$$(${BIN}/dotenv -f ${ENV_FILE} get MOPIDY_TRAEFIK_HOST)"
@echo
.PHONY: shell
shell:
@container=$$(eval "${BIN}/script-wizard choose 'docker exec -it into which container?' 'mopidy' 'snapserver' 'drawio' --default 'mopidy'") && make --no-print-directory docker-compose-shell SERVICE=$${container}
.PHONY: library
library:
@docker-compose --env-file ${ENV_FILE} exec -it mopidy mopidy local scan