docker-compose.ci.yml 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. # WARNING: This is a CI docker-compose file used for building and testing of the entire app, it should not be used for production.
  2. version: '3.8'
  3. services:
  4. fullstack-mysql:
  5. image: "${IMAGE}:ci-${BUILD_NUMBER}"
  6. environment:
  7. DEBUG: 'true'
  8. LE_STAGING: 'true'
  9. FORCE_COLOR: 1
  10. DB_MYSQL_HOST: 'db'
  11. DB_MYSQL_PORT: '3306'
  12. DB_MYSQL_USER: 'npm'
  13. DB_MYSQL_PASSWORD: 'npm'
  14. DB_MYSQL_NAME: 'npm'
  15. volumes:
  16. - npm_data:/data
  17. expose:
  18. - 81
  19. - 80
  20. - 443
  21. depends_on:
  22. - db
  23. healthcheck:
  24. test: ["CMD", "/bin/check-health"]
  25. interval: 10s
  26. timeout: 3s
  27. fullstack-sqlite:
  28. image: "${IMAGE}:ci-${BUILD_NUMBER}"
  29. environment:
  30. DEBUG: 'true'
  31. LE_STAGING: 'true'
  32. FORCE_COLOR: 1
  33. DB_SQLITE_FILE: '/data/mydb.sqlite'
  34. volumes:
  35. - npm_data:/data
  36. expose:
  37. - 81
  38. - 80
  39. - 443
  40. healthcheck:
  41. test: ["CMD", "/bin/check-health"]
  42. interval: 10s
  43. timeout: 3s
  44. db:
  45. image: jc21/mariadb-aria
  46. environment:
  47. MYSQL_ROOT_PASSWORD: 'npm'
  48. MYSQL_DATABASE: 'npm'
  49. MYSQL_USER: 'npm'
  50. MYSQL_PASSWORD: 'npm'
  51. volumes:
  52. - db_data:/var/lib/mysql
  53. cypress-mysql:
  54. image: "${IMAGE}-cypress:ci-${BUILD_NUMBER}"
  55. build:
  56. context: ../test/
  57. dockerfile: cypress/Dockerfile
  58. environment:
  59. CYPRESS_baseUrl: 'http://fullstack-mysql:81'
  60. volumes:
  61. - cypress-logs:/results
  62. command: cypress run --browser chrome --config-file=${CYPRESS_CONFIG:-cypress/config/ci.json}
  63. cypress-sqlite:
  64. image: "${IMAGE}-cypress:ci-${BUILD_NUMBER}"
  65. build:
  66. context: ../test/
  67. dockerfile: cypress/Dockerfile
  68. environment:
  69. CYPRESS_baseUrl: "http://fullstack-sqlite:81"
  70. volumes:
  71. - cypress-logs:/results
  72. command: cypress run --browser chrome --config-file=${CYPRESS_CONFIG:-cypress/config/ci.json}
  73. volumes:
  74. cypress-logs:
  75. npm_data:
  76. db_data: