overhangio / tutor

The Docker-based Open edX distribution designed for peace of mind
https://docs.tutor.overhang.io/
GNU Affero General Public License v3.0
928 stars 445 forks source link

Using EDX_PLATFORM_SETTINGS=development still results in SETTINGS=production #20

Closed natea closed 6 years ago

natea commented 6 years ago

I set the environment variable EDX_PLATFORM_SETTINGS=development but when I run make lms it appears to still be using SETTINGS=production.

And yes, I have made development.py in both cms/envs and lms/envs directories.

$ export EDX_PLATFORM_PATH=/Users/nateaune/Dropbox/code/natea-edx-platform-ginkgo
$ export EDX_PLATFORM_SETTINGS=development
$ make lms
docker-compose run --rm -e USERID="$(id -u)" -e SETTINGS=production --volume="/Users/nateaune/Dropbox/code/natea-edx-platform-ginkgo:/openedx/edx-platform" -p 8000:8000 lms bash
Starting openedx-docker_rabbitmq_1  ... done
Starting openedx-docker_smtp_1      ... done
Starting openedx-docker_mongodb_1   ... done
Starting openedx-docker_mysql_1     ... done
creating new user 'openedx' with UID 501
chown: changing ownership of '/openedx/edx-platform/common/static/edx-pattern-library/fonts': No such file or directory
chown: changing ownership of '/openedx/edx-platform/common/static/edx-pattern-library/js': No such file or directory
chown: changing ownership of '/openedx/edx-platform/common/static/edx-ui-toolkit/js': No such file or directory
make: *** [lms] Error 1
regisb commented 6 years ago

You are absolutely right @natea -- now fixed.

natea commented 6 years ago

Thank for the quick fix!

natea commented 6 years ago

@regisb any idea why I'm still seeing this when running make lms:

make: *** [lms] Error 1

Does it have anything to do with this?

chown: changing ownership of '/openedx/edx-platform/common/static/edx-pattern-library/fonts': No such file or directory
chown: changing ownership of '/openedx/edx-platform/common/static/edx-pattern-library/js': No such file or directory
chown: changing ownership of '/openedx/edx-platform/common/static/edx-ui-toolkit/js': No such file or directory
regisb commented 6 years ago

Can you give more content from the stacktrace?

natea commented 6 years ago

It's the same as what I posted in the first comment. Or is there a way to make it more verbose?

regisb commented 6 years ago

This is strange. It seems chown crashes because there are symlinks (common/static/edx-pattern-library/fonts, common/static/edx-pattern-library/js, common/static/edx-ui-toolkit/js) that point to non-existing folders in node_modules/. However, chown is not supposed to follow symlinks. I can't reproduce the issue locally, even by deleting the node_modules/ folder.

Can you try the following fix:

  1. In openedx/docker-entrypoint.sh replace chown -R openedx /openedx by chown -R openedx /openedx || true
  2. make build
  3. make lms
natea commented 6 years ago

Now I get a different error:

$ make lms
docker-compose run --rm -e USERID="$(id -u)" -e SETTINGS=development --volume="/Users/nateaune/Dropbox/code/natea-edx-platform-ginkgo:/openedx/edx-platform" -p 8000:8000 lms bash
Starting openedx-docker_rabbitmq_1  ...
Starting openedx-docker_mongodb_1   ... done
Starting openedx-docker_smtp_1      ... done
Starting openedx-docker_rabbitmq_1  ... done
creating new user 'openedx' with UID 501
chown: changing ownership of '/openedx/edx-platform/common/static/edx-pattern-library/fonts': No such file or directory
chown: changing ownership of '/openedx/edx-platform/common/static/edx-pattern-library/js': No such file or directory
chown: changing ownership of '/openedx/edx-platform/common/static/edx-ui-toolkit/js': No such file or directory
bash: /root/.bashrc: Permission denied
regisb commented 6 years ago

Is this a blocking error? I also get the "Permission denied" message but it's not preventing me from running the lms.

regisb commented 6 years ago

@natea both your issues were resolved by the last couple commits. Thanks again for being the canary in the mine!

natea commented 6 years ago

Thanks, I've confirmed that the LMS did in fact build and I was able to connect to it (even with the permission denied msg).

On Wed, Apr 25, 2018 at 12:49 PM, Régis B. notifications@github.com wrote:

@natea https://github.com/natea both your issues were resolved by the last couple commits. Thanks again for being the canary in the mine!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/regisb/openedx-docker/issues/20#issuecomment-384412288, or mute the thread https://github.com/notifications/unsubscribe-auth/AAHQyJ3S7Qj-UTx0unuE6U5htk9GtAq6ks5tsNNigaJpZM4ThD1k .

--

Website: http://www.appsembler.com Blog: http://www.appsembler.com/blog Twitter: http://twitter.com/natea LinkedIn: http://linkedin.com/in/natea Phone: +1 (617) 702-4331