docker-compose.ci.yml 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  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. PUID: 1000
  35. PGID: 1000
  36. DISABLE_IPV6: 'true'
  37. volumes:
  38. - npm_data:/data
  39. expose:
  40. - 81
  41. - 80
  42. - 443
  43. healthcheck:
  44. test: ["CMD", "/bin/check-health"]
  45. interval: 10s
  46. timeout: 3s
  47. db:
  48. image: jc21/mariadb-aria
  49. environment:
  50. MYSQL_ROOT_PASSWORD: 'npm'
  51. MYSQL_DATABASE: 'npm'
  52. MYSQL_USER: 'npm'
  53. MYSQL_PASSWORD: 'npm'
  54. volumes:
  55. - db_data:/var/lib/mysql
  56. cypress-mysql:
  57. image: "${IMAGE}-cypress:ci-${BUILD_NUMBER}"
  58. build:
  59. context: ../test/
  60. dockerfile: cypress/Dockerfile
  61. environment:
  62. CYPRESS_baseUrl: 'http://fullstack-mysql:81'
  63. volumes:
  64. - cypress-logs:/results
  65. command: cypress run --browser chrome --config-file=${CYPRESS_CONFIG:-cypress/config/ci.json}
  66. cypress-sqlite:
  67. image: "${IMAGE}-cypress:ci-${BUILD_NUMBER}"
  68. build:
  69. context: ../test/
  70. dockerfile: cypress/Dockerfile
  71. environment:
  72. CYPRESS_baseUrl: "http://fullstack-sqlite:81"
  73. volumes:
  74. - cypress-logs:/results
  75. command: cypress run --browser chrome --config-file=${CYPRESS_CONFIG:-cypress/config/ci.json}
  76. volumes:
  77. cypress-logs:
  78. npm_data:
  79. db_data: