2017-12-26 00:16:35 +00:00
|
|
|
.PHONY: all configure build migrate assets up daemon
|
|
|
|
|
|
|
|
all: configure build migrate assets daemon
|
|
|
|
|
|
|
|
##################### Bootstrapping commands
|
|
|
|
|
|
|
|
configure:
|
|
|
|
./configure
|
|
|
|
|
|
|
|
build:
|
|
|
|
docker-compose build
|
|
|
|
|
2017-07-19 07:42:42 +00:00
|
|
|
migrate:
|
2018-02-10 17:38:17 +00:00
|
|
|
docker-compose run --rm lms bash -c "./wait-for-greenlight.sh && ./manage.py lms --settings=production migrate"
|
|
|
|
docker-compose run --rm cms bash -c "./wait-for-greenlight.sh && ./manage.py cms --settings=production migrate"
|
2017-12-26 00:16:35 +00:00
|
|
|
|
2017-07-19 07:42:42 +00:00
|
|
|
assets:
|
2017-12-26 00:16:35 +00:00
|
|
|
docker-compose run --rm lms paver update_assets lms --settings=production
|
|
|
|
docker-compose run --rm cms paver update_assets cms --settings=production
|
|
|
|
|
|
|
|
##################### Running commands
|
|
|
|
|
|
|
|
up:
|
|
|
|
docker-compose up
|
|
|
|
|
|
|
|
daemon:
|
|
|
|
docker-compose up -d && \
|
|
|
|
echo "Daemon is up and running"
|
|
|
|
|
|
|
|
stop:
|
|
|
|
docker-compose stop
|
|
|
|
|
|
|
|
##################### Additional commands
|
|
|
|
|
2017-07-24 09:32:50 +00:00
|
|
|
lms-shell:
|
2018-01-29 16:18:37 +00:00
|
|
|
docker-compose run --rm lms ./manage.py lms --settings=production shell
|
2017-07-24 09:32:50 +00:00
|
|
|
cms-shell:
|
2018-01-29 16:18:37 +00:00
|
|
|
docker-compose run --rm lms ./manage.py cms --settings=production shell
|
2017-09-19 08:54:45 +00:00
|
|
|
|
|
|
|
import-demo-course:
|
2017-12-26 00:16:35 +00:00
|
|
|
docker-compose run --rm cms /bin/bash -c "git clone https://github.com/edx/edx-demo-course ../edx-demo-course && git -C ../edx-demo-course checkout open-release/ginkgo.master && python ./manage.py cms --settings=production import ../data ../edx-demo-course"
|
2018-03-26 17:26:04 +00:00
|
|
|
# Seed the course permissions: is it necessary? "./manage.py lms --settings=production seed_permissions_roles 'course-v1:edX+DemoX+Demo_Course'"
|
2018-01-29 16:18:37 +00:00
|
|
|
|
|
|
|
create-staff-user:
|
|
|
|
docker-compose run --rm lms /bin/bash -c "./manage.py lms --settings=production manage_user --superuser --staff ${USERNAME} ${EMAIL} && ./manage.py lms --settings=production changepassword ${USERNAME}"
|