diff --git a/Makefile b/Makefile index 6ac9b54..c8e83ca 100644 --- a/Makefile +++ b/Makefile @@ -7,13 +7,22 @@ USERID ?= $$(id -u) build: ## Build all docker images cd build/ && make build -configure: +config.json: @$(MAKE) -s -C build/ build-configurator 1> /dev/null @docker run --rm -it \ --volume="$(PWD):/openedx/config/" \ -e USERID=$(USERID) -e SILENT=$(SILENT) \ regis/openedx-configurator:hawthorn +substitute: config.json + @docker run --rm -it \ + --volume="$(PWD)/config.json:/openedx/config/config.json" \ + --volume="$(TEMPLATES):/openedx/templates" \ + --volume="$(OUTPUT):/openedx/output" \ + -e USERID=$(USERID) -e SILENT=$(SILENT) $(CONFIGURE_OPTS) \ + regis/openedx-configurator:hawthorn \ + configurator substitute /openedx/templates/ /openedx/output/ + singleserver: ## Configure and run a ready-to-go Open edX platform cd deploy/ && make all diff --git a/android/Makefile b/android/Makefile index 80b5686..bc6f82a 100644 --- a/android/Makefile +++ b/android/Makefile @@ -3,17 +3,8 @@ PWD ?= $$(pwd) all: environment update android ## Configure and build a development Android app -configure: - @$(MAKE) -C .. configure - -env: configure ## Generate the environment - @docker run --rm -it \ - --volume="$(PWD)/../:/openedx/config/" \ - --volume="$(PWD)/templates:/openedx/templates" \ - --volume="$(PWD)/config:/openedx/output" \ - -e USERID=$(USERID) \ - regis/openedx-configurator:hawthorn \ - configurator substitute /openedx/templates/ /openedx/output/ +env: ## Generate the environment + @$(MAKE) -s -C .. substitute TEMPLATES=$(PWD)/templates OUTPUT=$(PWD)/config update: ## Download most recent Android image docker pull regis/openedx-android:latest diff --git a/deploy/Makefile b/deploy/Makefile index 717d091..c57a6d1 100644 --- a/deploy/Makefile +++ b/deploy/Makefile @@ -1,22 +1,5 @@ .PHONY: env PWD = $$(pwd) -configure: - @$(MAKE) -s -C .. configure - -env: configure ## Create the platform environment - @docker run --rm -it \ - --volume="$(PWD)/../:/openedx/config/" \ - --volume="$(PWD)/templates/apps:/openedx/templates" \ - --volume="$(PWD)/env:/openedx/output" \ - -e USERID=$(USERID) -e SILENT=$(SILENT) $(CONFIGURE_OPTS) \ - regis/openedx-configurator:hawthorn \ - configurator substitute /openedx/templates/ /openedx/output/ - @docker run --rm -it \ - --volume="$(PWD)/../:/openedx/config/" \ - --volume="$(PWD)/templates/project:/openedx/templates" \ - --volume="$(PWD):/openedx/output" \ - -e USERID=$(USERID) -e SILENT=$(SILENT) $(CONFIGURE_OPTS) \ - regis/openedx-configurator:hawthorn \ - configurator substitute /openedx/templates/ /openedx/output/ - +env: ## Create the platform environment + @$(MAKE) -s -C .. substitute TEMPLATES=$(PWD)/templates OUTPUT=$(PWD)/env diff --git a/deploy/singleserver/Makefile b/deploy/singleserver/Makefile index 9d5a61e..115e726 100644 --- a/deploy/singleserver/Makefile +++ b/deploy/singleserver/Makefile @@ -47,17 +47,12 @@ update: ## Download most recent images ##################### Configuration configure: - @$(MAKE) -s -C .. configure + @$(MAKE) -s -C ../.. --always-make config.json + @$(MAKE) -s env env: @$(MAKE) -s -C .. env - @docker run --rm -it \ - --volume="$(PWD)/../../:/openedx/config/" \ - --volume="$(PWD)/templates/:/openedx/templates" \ - --volume="$(PWD):/openedx/output" \ - -e USERID=$(USERID) \ - regis/openedx-configurator:hawthorn \ - configurator substitute /openedx/templates/ /openedx/output/ + @$(MAKE) -s -C ../.. substitute TEMPLATES=$(PWD)/templates OUTPUT=$(PWD) ##################### Database