mirror of
https://github.com/ChristianLight/tutor.git
synced 2025-01-05 15:12:10 +00:00
Create staff user, fix studio nginx static assets
This commit is contained in:
parent
4295884a08
commit
81af46fbe9
11
Makefile
11
Makefile
@ -11,8 +11,8 @@ build:
|
||||
docker-compose build
|
||||
|
||||
migrate:
|
||||
docker-compose run --rm lms bash -c "./wait-for-mysql.sh && ./manage.py lms migrate --settings=production"
|
||||
docker-compose run --rm cms bash -c "./wait-for-mysql.sh && ./manage.py cms migrate --settings=production"
|
||||
docker-compose run --rm lms bash -c "./wait-for-mysql.sh && ./manage.py lms --settings=production migrate"
|
||||
docker-compose run --rm cms bash -c "./wait-for-mysql.sh && ./manage.py cms --settings=production migrate"
|
||||
|
||||
assets:
|
||||
docker-compose run --rm lms paver update_assets lms --settings=production
|
||||
@ -33,9 +33,12 @@ stop:
|
||||
##################### Additional commands
|
||||
|
||||
lms-shell:
|
||||
docker-compose run --rm lms ./manage.py lms shell --settings=production
|
||||
docker-compose run --rm lms ./manage.py lms --settings=production shell
|
||||
cms-shell:
|
||||
docker-compose run --rm lms ./manage.py cms shell --settings=production
|
||||
docker-compose run --rm lms ./manage.py cms --settings=production shell
|
||||
|
||||
import-demo-course:
|
||||
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"
|
||||
|
||||
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}"
|
||||
|
@ -57,6 +57,14 @@ This will launch the various docker containers required for your Open edX platfo
|
||||
|
||||
## Additional commands
|
||||
|
||||
### Creating a new user with staff and admin rights
|
||||
|
||||
You will most certainly need to create a user to administer the platform. Just run:
|
||||
|
||||
USERNAME=yourusername EMAIL=user@email.com make create-staff-user
|
||||
|
||||
You will asked to set the user password interactively.
|
||||
|
||||
### Importing the demo course
|
||||
|
||||
On a fresh install, your platform will not have a single course. To import the [Open edX demo course](https://github.com/edx/edx-demo-course ), run:
|
||||
|
@ -33,7 +33,8 @@ services:
|
||||
ports:
|
||||
- "80:80"
|
||||
volumes:
|
||||
- ./data/lms:/openedx/data:ro
|
||||
- ./data/lms:/openedx/data/lms:ro
|
||||
- ./data/cms:/openedx/data/cms:ro
|
||||
depends_on:
|
||||
- lms
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
FROM nginx:1.13
|
||||
VOLUME /openedx/data
|
||||
VOLUME /openedx/data/lms
|
||||
VOLUME /openedx/data/cms
|
||||
|
||||
COPY ./config/lms.conf /etc/nginx/conf.d/lms.conf
|
||||
COPY ./config/cms.conf /etc/nginx/conf.d/cms.conf
|
||||
|
@ -35,7 +35,7 @@ server {
|
||||
}
|
||||
|
||||
location ~ ^/static/(?P<file>.*) {
|
||||
root /openedx/data;
|
||||
root /openedx/data/cms;
|
||||
try_files /staticfiles/$file /course_static/$file =404;
|
||||
|
||||
# return a 403 for static files that shouldn't be
|
||||
|
@ -57,7 +57,7 @@ server {
|
||||
}
|
||||
|
||||
location ~ ^/static/(?P<file>.*) {
|
||||
root /openedx/data;
|
||||
root /openedx/data/lms;
|
||||
try_files /staticfiles/$file /course_static/$file =404;
|
||||
|
||||
# return a 403 for static files that shouldn't be
|
||||
|
Loading…
Reference in New Issue
Block a user