docker-compose.ci.yml 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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. fullstack-sqlite:
  23. image: ${IMAGE}:ci-${BUILD_NUMBER}
  24. environment:
  25. NODE_ENV: "development"
  26. FORCE_COLOR: 1
  27. DB_SQLITE_FILE: "/data/database.sqlite"
  28. volumes:
  29. - npm_data:/data
  30. - ../.jenkins/config-sqlite.json:/app/config/development.json
  31. expose:
  32. - 81
  33. - 80
  34. - 443
  35. db:
  36. image: jc21/mariadb-aria
  37. environment:
  38. MYSQL_ROOT_PASSWORD: "npm"
  39. MYSQL_DATABASE: "npm"
  40. MYSQL_USER: "npm"
  41. MYSQL_PASSWORD: "npm"
  42. volumes:
  43. - db_data:/var/lib/mysql
  44. cypress-mysql:
  45. image: ${IMAGE}-cypress:ci-${BUILD_NUMBER}
  46. build:
  47. context: ../
  48. dockerfile: test/cypress/Dockerfile
  49. environment:
  50. CYPRESS_baseUrl: "http://fullstack-mysql:81"
  51. volumes:
  52. - cypress-logs:/results
  53. command: cypress run --browser chrome --config-file=${CYPRESS_CONFIG:-cypress/config/ci.json}
  54. cypress-sqlite:
  55. image: ${IMAGE}-cypress:ci-${BUILD_NUMBER}
  56. build:
  57. context: ../
  58. dockerfile: test/cypress/Dockerfile
  59. environment:
  60. CYPRESS_baseUrl: "http://fullstack-sqlite:81"
  61. volumes:
  62. - cypress-logs:/results
  63. command: cypress run --browser chrome --config-file=${CYPRESS_CONFIG:-cypress/config/ci.json}
  64. volumes:
  65. cypress-logs:
  66. npm_data:
  67. db_data: