forked from bcgov/moodle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
38 lines (26 loc) · 647 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
26
27
28
29
30
31
32
33
34
35
36
37
ENV_NAME ?= dev
SSL_PROXY=true
DB_HOST="mysql-0.mysql"
ifeq ($(ENV_NAME), dev)
SITE_URL="https://moodle-950003-dev.apps.silver.devops.gov.bc.ca"
endif
ifeq ($(ENV_NAME), test)
SITE_URL="https://moodle-950003-test.apps.silver.devops.gov.bc.ca"
endif
ifeq ($(ENV_NAME), prod)
SITE_URL="https://moodle-950003-prod.apps.silver.devops.gov.bc.ca"
endif
define ENV_FILE_DATA
SSL_PROXY = "$(SSL_PROXY)"
DB_HOST = "$(DB_HOST)"
SITE_URL = "$(SITE_URL)"
endef
export ENV_FILE_DATA
print-env:
@echo ENV_NAME=$(ENV_NAME)
@echo
@echo ./.env.${ENV_NAME}:
@echo "$$ENV_FILE_DATA"
@echo
write-config:
@echo "$$ENV_FILE_DATA" > ./.env.$(ENV_NAME)