docker-compose.ci.yml 1.7 KB

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