I'm making my own devstack for works with OpenEdx
.
I pulled the official devstack
repository from edx and I'm modifying it.
I'm trying add forums
to my stack but I can't run in since docker compose.
I added this to composer
file:
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
I'm confuse about which the correct command in run:
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'
This is the command for studio.
forums:
command: bash -c 'source /edx/app/forum/cs_comments_service_env && ruby app.rb -p 18080'
I tried with this but the folder doesn't exist.
So I tried with: command: bash -c 'ruby app.rb -p 18080'
but I get this error:
edx.devstack.forums | bash: ruby: command not found
edx.devstack.forums exited with code 127
So, I'm confused about the forums
image and about how can I provide it so that it works correctly.
Can anyone help me?
- How provide it?
- How run it(command)?
UPDATE:
I have a new configuration:
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:[email protected]: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
But I still have this issue:
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
But, why?