docker-compose.ci.yml 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  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_mysql:/data
  17. - npm_le_mysql:/etc/letsencrypt
  18. expose:
  19. - 81
  20. - 80
  21. - 443
  22. depends_on:
  23. - db
  24. healthcheck:
  25. test: ["CMD", "/usr/bin/check-health"]
  26. interval: 10s
  27. timeout: 3s
  28. fullstack-sqlite:
  29. image: "${IMAGE}:ci-${BUILD_NUMBER}"
  30. environment:
  31. DEBUG: 'true'
  32. LE_STAGING: 'true'
  33. FORCE_COLOR: 1
  34. DB_SQLITE_FILE: '/data/mydb.sqlite'
  35. PUID: 1000
  36. PGID: 1000
  37. DISABLE_IPV6: 'true'
  38. volumes:
  39. - npm_data_sqlite:/data
  40. - npm_le_sqlite:/etc/letsencrypt
  41. expose:
  42. - 81
  43. - 80
  44. - 443
  45. healthcheck:
  46. test: ["CMD", "/usr/bin/check-health"]
  47. interval: 10s
  48. timeout: 3s
  49. db:
  50. image: jc21/mariadb-aria
  51. environment:
  52. MYSQL_ROOT_PASSWORD: 'npm'
  53. MYSQL_DATABASE: 'npm'
  54. MYSQL_USER: 'npm'
  55. MYSQL_PASSWORD: 'npm'
  56. volumes:
  57. - mysql_data:/var/lib/mysql
  58. cypress-mysql:
  59. image: "${IMAGE}-cypress:ci-${BUILD_NUMBER}"
  60. build:
  61. context: ../test/
  62. dockerfile: cypress/Dockerfile
  63. environment:
  64. CYPRESS_baseUrl: 'http://fullstack-mysql:81'
  65. volumes:
  66. - cypress_logs_mysql:/results
  67. command: cypress run --browser chrome --config-file=${CYPRESS_CONFIG:-cypress/config/ci.json}
  68. cypress-sqlite:
  69. image: "${IMAGE}-cypress:ci-${BUILD_NUMBER}"
  70. build:
  71. context: ../test/
  72. dockerfile: cypress/Dockerfile
  73. environment:
  74. CYPRESS_baseUrl: "http://fullstack-sqlite:81"
  75. volumes:
  76. - cypress_logs_sqlite:/results
  77. command: cypress run --browser chrome --config-file=${CYPRESS_CONFIG:-cypress/config/ci.json}
  78. volumes:
  79. cypress_logs_mysql:
  80. cypress_logs_sqlite:
  81. npm_data_mysql:
  82. npm_data_sqlite:
  83. npm_le_sqlite:
  84. npm_le_mysql:
  85. mysql_data: