Advertisement
Guest User

Untitled

a guest
Mar 28th, 2018
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.52 KB | None | 0 0
  1. TO get sqlsrv full-text woking on the normal docker containers:
  2.  
  3. - Follow https://github.com/moodlehq/moodle-docker instructions
  4. - Once all the containers are running, and before installing any moodle, we are going to modify the mssql one
  5.  
  6. docker ps
  7. docker exec -it DB_CONTAINERID /bin/bash
  8.  
  9. - Now you are in a shell in the container.
  10.  
  11. apt-get update
  12.  
  13. apt-get install -y curl
  14.  
  15. curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -
  16. curl https://packages.microsoft.com/config/ubuntu/16.04/mssql-server-2017.list | tee /etc/apt/sources.list.d/mssql-server.list
  17.  
  18. apt-get update
  19.  
  20. apt-get install -y mssql-server-fts
  21.  
  22. /opt/mssql/bin/mssql-conf set sqlagent.enabled true
  23.  
  24.  
  25. ======= SAVE THE CONTAINER =========
  26. (using another shell session)
  27. docker ps
  28. docker commit DB_CONTAINERID moodlehq/moodle-db-mssql
  29. ====================================
  30.  
  31.  
  32. (back to the shell in the container)
  33. exit
  34.  
  35. - now you're back in your computer, out from the docker container
  36.  
  37. (restart the whole compose)
  38. bin/moodle-docker-compose down
  39.  
  40. bin/moodle-docker-compose up -d
  41.  
  42. Install the moodle site:
  43.  
  44. https://github.com/moodlehq/moodle-docker#use-containers-for-manual-testing
  45.  
  46. Verify http://localhost:8000 works for you and shows the "Docker" site installed.
  47.  
  48. Create this script in your moodle base dir and run it via web:
  49.  
  50. echo "<?php require('config.php'); var_dump(\$DB->is_fulltext_search_supported());" > "$MOODLE_DOCKER_WWWROOT/isfull.php"
  51.  
  52. Try it, must return true
  53. http://localhost:8000/isfull.php
  54.  
  55. Go testing!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement