mirror of
https://github.com/ChristianLight/tutor.git
synced 2025-01-07 16:04:02 +00:00
Better naming for db make targets
This commit is contained in:
parent
4f3117f81b
commit
050dfc9b23
@ -4,7 +4,7 @@ services:
|
|||||||
script:
|
script:
|
||||||
- make configure SILENT=1 ACTIVATE_NOTES=1 ACTIVATE_XQUEUE=1
|
- make configure SILENT=1 ACTIVATE_NOTES=1 ACTIVATE_XQUEUE=1
|
||||||
- make build
|
- make build
|
||||||
- make migrate
|
- make databases
|
||||||
#- make assets # too time-consuming
|
#- make assets # too time-consuming
|
||||||
deploy:
|
deploy:
|
||||||
provider: script
|
provider: script
|
||||||
|
13
Makefile
13
Makefile
@ -43,7 +43,7 @@ DOCKER_COMPOSE_RUN_CMS = $(DOCKER_COMPOSE_RUN_OPENEDX) -p 8001:8001 cms
|
|||||||
all: configure ## Configure and run a full-featured platform
|
all: configure ## Configure and run a full-featured platform
|
||||||
@$(MAKE) post_configure
|
@$(MAKE) post_configure
|
||||||
@$(MAKE) update
|
@$(MAKE) update
|
||||||
@$(MAKE) migrate
|
@$(MAKE) databases
|
||||||
@$(MAKE) assets
|
@$(MAKE) assets
|
||||||
@$(MAKE) daemonize
|
@$(MAKE) daemonize
|
||||||
@echo "All set \o/ You can access the LMS at http://localhost and the CMS at http://studio.localhost"
|
@echo "All set \o/ You can access the LMS at http://localhost and the CMS at http://studio.localhost"
|
||||||
@ -72,27 +72,25 @@ post_configure: $(post_configure_targets)
|
|||||||
|
|
||||||
##################### Database
|
##################### Database
|
||||||
|
|
||||||
migrate: provision-database migrate-openedx migrate-forum $(extra_migrate_targets) provision-oauth2 ## Perform all database migrations
|
databases: provision-databases migrate provision-oauth2 ## Bootstrap databases
|
||||||
provision-database: ## Create necessary databases and users
|
|
||||||
|
provision-databases: ## Create necessary databases and users
|
||||||
$(DOCKER_COMPOSE_RUN) lms /openedx/config/provision.sh
|
$(DOCKER_COMPOSE_RUN) lms /openedx/config/provision.sh
|
||||||
provision-oauth2: ## Create users for SSO between services
|
provision-oauth2: ## Create users for SSO between services
|
||||||
$(DOCKER_COMPOSE_RUN) lms /openedx/config/oauth2.sh
|
$(DOCKER_COMPOSE_RUN) lms /openedx/config/oauth2.sh
|
||||||
|
|
||||||
|
migrate: migrate-openedx migrate-forum $(extra_migrate_targets) ## Perform all database migrations
|
||||||
migrate-openedx: ## Perform database migrations on LMS/CMS
|
migrate-openedx: ## Perform database migrations on LMS/CMS
|
||||||
$(DOCKER_COMPOSE_RUN) lms bash -c "dockerize -wait tcp://mysql:3306 -timeout 20s && ./manage.py lms migrate"
|
$(DOCKER_COMPOSE_RUN) lms bash -c "dockerize -wait tcp://mysql:3306 -timeout 20s && ./manage.py lms migrate"
|
||||||
$(DOCKER_COMPOSE_RUN) cms bash -c "dockerize -wait tcp://mysql:3306 -timeout 20s && ./manage.py cms migrate"
|
$(DOCKER_COMPOSE_RUN) cms bash -c "dockerize -wait tcp://mysql:3306 -timeout 20s && ./manage.py cms migrate"
|
||||||
$(MAKE) reindex-courses
|
$(MAKE) reindex-courses
|
||||||
|
|
||||||
migrate-forum: ## Perform database migrations on discussion forums
|
migrate-forum: ## Perform database migrations on discussion forums
|
||||||
$(DOCKER_COMPOSE_RUN) forum bash -c "bundle exec rake search:initialize && \
|
$(DOCKER_COMPOSE_RUN) forum bash -c "bundle exec rake search:initialize && \
|
||||||
bundle exec rake search:rebuild_index"
|
bundle exec rake search:rebuild_index"
|
||||||
|
|
||||||
migrate-notes: ## Perform database migrations for the Notes service
|
migrate-notes: ## Perform database migrations for the Notes service
|
||||||
$(DOCKER_COMPOSE_RUN) notes ./manage.py migrate
|
$(DOCKER_COMPOSE_RUN) notes ./manage.py migrate
|
||||||
|
|
||||||
migrate-xqueue: ## Perform database migrations for the XQueue service
|
migrate-xqueue: ## Perform database migrations for the XQueue service
|
||||||
$(DOCKER_COMPOSE_RUN) xqueue ./manage.py migrate
|
$(DOCKER_COMPOSE_RUN) xqueue ./manage.py migrate
|
||||||
|
|
||||||
reindex-courses: ## Refresh course index so they can be found in the LMS search engine
|
reindex-courses: ## Refresh course index so they can be found in the LMS search engine
|
||||||
$(DOCKER_COMPOSE_RUN) cms ./manage.py cms reindex_course --all --setup
|
$(DOCKER_COMPOSE_RUN) cms ./manage.py cms reindex_course --all --setup
|
||||||
|
|
||||||
@ -131,7 +129,6 @@ update: ## Download most recent images
|
|||||||
$(DOCKER_COMPOSE) pull
|
$(DOCKER_COMPOSE) pull
|
||||||
|
|
||||||
build: build-openedx build-configurator build-forum build-notes build-xqueue build-android ## Build all docker images
|
build: build-openedx build-configurator build-forum build-notes build-xqueue build-android ## Build all docker images
|
||||||
|
|
||||||
build-openedx: ## Build the Open edX docker image
|
build-openedx: ## Build the Open edX docker image
|
||||||
docker build -t regis/openedx:latest -t regis/openedx:hawthorn openedx/
|
docker build -t regis/openedx:latest -t regis/openedx:hawthorn openedx/
|
||||||
build-configurator: ## Build the configurator docker image
|
build-configurator: ## Build the configurator docker image
|
||||||
|
@ -118,9 +118,9 @@ This is the only non-automatic step in the install process. You will be asked va
|
|||||||
|
|
||||||
You will need to download the docker images from [Docker Hub](https://hub.docker.com/r/regis/openedx/). Depending on your bandwidth, this might take a long time. Minor image updates will be incremental, and thus much faster.
|
You will need to download the docker images from [Docker Hub](https://hub.docker.com/r/regis/openedx/). Depending on your bandwidth, this might take a long time. Minor image updates will be incremental, and thus much faster.
|
||||||
|
|
||||||
### Migrations and assets
|
### Database creation, migrations and collection of static assets
|
||||||
|
|
||||||
make migrate
|
make databases
|
||||||
make assets
|
make assets
|
||||||
|
|
||||||
These commands should be run just once. They will create the required databases tables, apply database migrations and generate static assets, such as images, stylesheets and Javascript dependencies.
|
These commands should be run just once. They will create the required databases tables, apply database migrations and generate static assets, such as images, stylesheets and Javascript dependencies.
|
||||||
|
Loading…
Reference in New Issue
Block a user