docker-compose.yml 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. version: "2.3"
  2. volumes:
  3. data:
  4. services:
  5. test_unit:
  6. build:
  7. context: .
  8. target: base
  9. volumes:
  10. - .:/app
  11. working_dir: /app
  12. environment:
  13. BASE_CONFIG:
  14. SHARELATEX_CONFIG:
  15. MOCHA_GREP: ${MOCHA_GREP}
  16. NODE_OPTIONS: "--unhandled-rejections=strict"
  17. command: npm run --silent test:unit:app
  18. user: node
  19. test_acceptance:
  20. image: node:12.22.3
  21. volumes:
  22. - .:/app
  23. working_dir: /app
  24. env_file: docker-compose.common.env
  25. environment:
  26. BASE_CONFIG:
  27. SHARELATEX_CONFIG:
  28. MOCHA_GREP: ${MOCHA_GREP}
  29. MONGO_SERVER_SELECTION_TIMEOUT: 600000
  30. MONGO_SOCKET_TIMEOUT: 300000
  31. # SHARELATEX_ALLOW_ANONYMOUS_READ_AND_WRITE_SHARING: 'true'
  32. extra_hosts:
  33. - 'www.overleaf.test:127.0.0.1'
  34. depends_on:
  35. - redis
  36. - mongo
  37. - saml
  38. - ldap
  39. command: npm run --silent test:acceptance:app
  40. test_karma:
  41. build:
  42. context: .
  43. dockerfile: Dockerfile.frontend
  44. volumes:
  45. - .:/app
  46. environment:
  47. NODE_OPTIONS: "--unhandled-rejections=strict"
  48. working_dir: /app
  49. command: npm run --silent test:karma:single
  50. test_frontend:
  51. build:
  52. context: .
  53. target: base
  54. volumes:
  55. - .:/app
  56. working_dir: /app
  57. environment:
  58. MOCHA_GREP: ${MOCHA_GREP}
  59. NODE_OPTIONS: "--unhandled-rejections=strict"
  60. command: npm run --silent test:frontend
  61. user: node
  62. redis:
  63. image: redis
  64. mongo:
  65. image: mongo:4.0.19
  66. ldap:
  67. restart: always
  68. image: rroemhild/test-openldap:1.1
  69. saml:
  70. restart: always
  71. image: gcr.io/overleaf-ops/saml-test
  72. environment:
  73. SAML_BASE_URL_PATH: 'http://saml/simplesaml/'
  74. SAML_TEST_SP_ENTITY_ID: 'sharelatex-test-saml'
  75. SAML_TEST_SP_LOCATION: 'http://www.overleaf.test:3000/saml/callback'