我正在为与OpenEdx
.
我从 edx 中提取了官方devstack
存储库,并且正在对其进行修改。
我正在尝试添加forums
到我的堆栈中,但由于 docker compose,我无法运行。
我将此添加到composer
文件中:
forums:
command: bash -c 'source /edx/app/forum/cs_comments_service_env && ruby app.rb -p 18080'
container_name: edx.devstack.forums
depends_on:
# - xqueue:xqueue
- mongo
- elasticsearch
# - rabbitmq:rabbitmq
- mysql
- memcached
environment:
CACHE_LOCATION: edx.devstack.memcached:12211
DB_HOST: edx.devstack.mysql
TEST_ELASTICSEARCH_URL: "http://edx.devstack.elasticsearch:9200"
image: edxops/forums:latest
ports:
- 4567:4567
我对运行中的正确命令感到困惑:
studio:
command: bash -c 'source /edx/app/edxapp/edxapp_env && python /edx/app/edxapp/edx-platform/manage.py cms runserver 0.0.0.0:18010 --settings devstack_docker'
这是工作室的命令。
forums:
command: bash -c 'source /edx/app/forum/cs_comments_service_env && ruby app.rb -p 18080'
我试过这个,但文件夹不存在。
所以我尝试了:command: bash -c 'ruby app.rb -p 18080'
但我收到了这个错误:
edx.devstack.forums | bash: ruby: command not found
edx.devstack.forums exited with code 127
所以,我对forums
图像以及如何提供它以使其正常工作感到困惑。
谁能帮我?- 如何提供?- 如何运行它(命令)?
更新:
我有一个新配置:
forums:
command: bash -c 'cd /edx/app/forum/cs_comments_service && exec /edx/app/forum/cs_comments_service/bin/unicorn -c config/unicorn_tcp.rb'
container_name: edx.devstack.forums
depends_on:
# - xqueue:xqueue
- mongo
- elasticsearch
# - rabbitmq:rabbitmq
- mysql
- memcached
environment:
CACHE_LOCATION: edx.devstack.memcached:12211
DB_HOST: edx.devstack.mysql
SEARCH_SERVER: "http://edx.devstack.elasticsearch:9200"
TEST_ELASTICSEARCH_URL: "http://edx.devstack.elasticsearch:9200"
MONGOHQ_URL: "mongodb://cs_comments_service:password@mongo.edx:27017/cs_comments_service"
GEM_PATH: "/edx/app/forum/.gem"
GEM_HOME: "/edx/app/forum/.gem"
RBENV_ROOT: "/edx/app/forum/.rbenv"
image: edxops/forum:latest
ports:
- 4567:4567
但我仍然有这个问题:
docker-compose logs -f --tail=500 | grep edx.devstack.forums
Attaching to edx.devstack.forums, edx.devstack.chrome, edx.devstack.firefox, edx.devstack.credentials, edx.devstack.discovery, edx.devstack.elasticsearch, edx.devstack.ecommerce, edx.devstack.studio, edx.devstack.lms, edx.devstack.memcached, edx.devstack.mysql, edx.devstack.mongo
edx.devstack.forums | /usr/bin/env: ‘ruby’: No such file or directory
但为什么?