docker-compose.ci.yml 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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:
  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.json:/app/config/production.json
  12. expose:
  13. - 81
  14. - 80
  15. - 443
  16. depends_on:
  17. - db
  18. db:
  19. image: jc21/mariadb-aria
  20. environment:
  21. MYSQL_ROOT_PASSWORD: "npm"
  22. MYSQL_DATABASE: "npm"
  23. MYSQL_USER: "npm"
  24. MYSQL_PASSWORD: "npm"
  25. volumes:
  26. - db_data:/var/lib/mysql
  27. cypress:
  28. image: ${IMAGE}-cypress:ci-${BUILD_NUMBER}
  29. build:
  30. context: ../
  31. dockerfile: test/cypress/Dockerfile
  32. environment:
  33. CYPRESS_baseUrl: "http://fullstack:81"
  34. volumes:
  35. - cypress-logs:/results
  36. command: cypress run --browser chrome --config-file=${CYPRESS_CONFIG:-cypress/config/ci.json}
  37. volumes:
  38. cypress-logs:
  39. npm_data:
  40. db_data: