docker-compose.ci.yml 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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"
  3. services:
  4. fullstack-mysql:
  5. image: ${IMAGE}:ci-${BUILD_NUMBER}
  6. environment:
  7. NODE_ENV: "development"
  8. FORCE_COLOR: 1
  9. DB_MYSQL_HOST: "db"
  10. DB_MYSQL_PORT: 3306
  11. DB_MYSQL_USER: "npm"
  12. DB_MYSQL_PASSWORD: "npm"
  13. DB_MYSQL_NAME: "npm"
  14. volumes:
  15. - npm_data:/data
  16. expose:
  17. - 81
  18. - 80
  19. - 443
  20. depends_on:
  21. - db
  22. healthcheck:
  23. test: ["CMD", "/bin/check-health"]
  24. interval: 10s
  25. timeout: 3s
  26. fullstack-sqlite:
  27. image: ${IMAGE}:ci-${BUILD_NUMBER}
  28. environment:
  29. NODE_ENV: "development"
  30. FORCE_COLOR: 1
  31. DB_SQLITE_FILE: "/data/database.sqlite"
  32. volumes:
  33. - npm_data:/data
  34. expose:
  35. - 81
  36. - 80
  37. - 443
  38. healthcheck:
  39. test: ["CMD", "/bin/check-health"]
  40. interval: 10s
  41. timeout: 3s
  42. db:
  43. image: jc21/mariadb-aria
  44. environment:
  45. MYSQL_ROOT_PASSWORD: "npm"
  46. MYSQL_DATABASE: "npm"
  47. MYSQL_USER: "npm"
  48. MYSQL_PASSWORD: "npm"
  49. volumes:
  50. - db_data:/var/lib/mysql
  51. cypress-mysql:
  52. image: ${IMAGE}-cypress:ci-${BUILD_NUMBER}
  53. build:
  54. context: ../test/
  55. dockerfile: cypress/Dockerfile
  56. environment:
  57. CYPRESS_baseUrl: "http://fullstack-mysql:81"
  58. volumes:
  59. - cypress-logs:/results
  60. command: cypress run --browser chrome --config-file=${CYPRESS_CONFIG:-cypress/config/ci.json}
  61. cypress-sqlite:
  62. image: ${IMAGE}-cypress:ci-${BUILD_NUMBER}
  63. build:
  64. context: ../test/
  65. dockerfile: cypress/Dockerfile
  66. environment:
  67. CYPRESS_baseUrl: "http://fullstack-sqlite:81"
  68. volumes:
  69. - cypress-logs:/results
  70. command: cypress run --browser chrome --config-file=${CYPRESS_CONFIG:-cypress/config/ci.json}
  71. volumes:
  72. cypress-logs:
  73. npm_data:
  74. db_data: