docker-compose.ci.yml 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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. volumes:
  10. - npm_data:/data
  11. - ../.jenkins/config-mysql.json:/app/config/development.json
  12. expose:
  13. - 81
  14. - 80
  15. - 443
  16. depends_on:
  17. - db
  18. fullstack-sqlite:
  19. image: ${IMAGE}:ci-${BUILD_NUMBER}
  20. environment:
  21. - NODE_ENV=development
  22. - FORCE_COLOR=1
  23. volumes:
  24. - npm_data:/data
  25. - ../.jenkins/config-sqlite.json:/app/config/development.json
  26. expose:
  27. - 81
  28. - 80
  29. - 443
  30. db:
  31. image: jc21/mariadb-aria
  32. environment:
  33. MYSQL_ROOT_PASSWORD: "npm"
  34. MYSQL_DATABASE: "npm"
  35. MYSQL_USER: "npm"
  36. MYSQL_PASSWORD: "npm"
  37. volumes:
  38. - db_data:/var/lib/mysql
  39. cypress:
  40. image: ${IMAGE}-cypress:ci-${BUILD_NUMBER}
  41. build:
  42. context: ../
  43. dockerfile: test/cypress/Dockerfile
  44. environment:
  45. CYPRESS_baseUrl: "http://fullstack:81"
  46. volumes:
  47. - cypress-logs:/results
  48. command: cypress run --browser chrome --config-file=${CYPRESS_CONFIG:-cypress/config/ci.json}
  49. volumes:
  50. cypress-logs:
  51. npm_data:
  52. db_data: