docker-compose.ci.yml 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. # WARNING: This is a CI docker-compose file used for building
  2. # and testing of the entire app, it should not be used for production.
  3. # This is a base compose file, it should be extended with a
  4. # docker-compose.ci.*.yml file
  5. services:
  6. fullstack:
  7. image: "${IMAGE}:${BRANCH_LOWER}-ci-${BUILD_NUMBER}"
  8. environment:
  9. DEBUG: 'true'
  10. FORCE_COLOR: 1
  11. volumes:
  12. - 'npm_data_ci:/data'
  13. - 'npm_le_ci:/etc/letsencrypt'
  14. - './dev/letsencrypt.ini:/etc/letsencrypt.ini:ro'
  15. - './dev/resolv.conf:/etc/resolv.conf:ro'
  16. - '/etc/localtime:/etc/localtime:ro'
  17. healthcheck:
  18. test: ["CMD", "/usr/bin/check-health"]
  19. interval: 10s
  20. timeout: 3s
  21. networks:
  22. fulltest:
  23. aliases:
  24. - website1.example.com
  25. - website2.example.com
  26. - website3.example.com
  27. stepca:
  28. image: jc21/testca
  29. volumes:
  30. - './dev/resolv.conf:/etc/resolv.conf:ro'
  31. - '/etc/localtime:/etc/localtime:ro'
  32. networks:
  33. fulltest:
  34. aliases:
  35. - ca.internal
  36. pdns:
  37. image: pschiffe/pdns-mysql
  38. volumes:
  39. - '/etc/localtime:/etc/localtime:ro'
  40. environment:
  41. PDNS_master: 'yes'
  42. PDNS_api: 'yes'
  43. PDNS_api_key: 'npm'
  44. PDNS_webserver: 'yes'
  45. PDNS_webserver_address: '0.0.0.0'
  46. PDNS_webserver_password: 'npm'
  47. PDNS_webserver-allow-from: '127.0.0.0/8,192.0.0.0/8,10.0.0.0/8,172.0.0.0/8'
  48. PDNS_version_string: 'anonymous'
  49. PDNS_default_ttl: 1500
  50. PDNS_allow_axfr_ips: '127.0.0.0/8,192.0.0.0/8,10.0.0.0/8,172.0.0.0/8'
  51. PDNS_gmysql_host: pdns-db
  52. PDNS_gmysql_port: 3306
  53. PDNS_gmysql_user: pdns
  54. PDNS_gmysql_password: pdns
  55. PDNS_gmysql_dbname: pdns
  56. depends_on:
  57. - pdns-db
  58. networks:
  59. fulltest:
  60. aliases:
  61. - ns1.pdns
  62. - ns2.pdns
  63. pdns-db:
  64. image: mariadb
  65. environment:
  66. MYSQL_ROOT_PASSWORD: 'pdns'
  67. MYSQL_DATABASE: 'pdns'
  68. MYSQL_USER: 'pdns'
  69. MYSQL_PASSWORD: 'pdns'
  70. volumes:
  71. - 'pdns_mysql_vol:/var/lib/mysql'
  72. - '/etc/localtime:/etc/localtime:ro'
  73. - './dev/pdns-db.sql:/docker-entrypoint-initdb.d/01_init.sql:ro'
  74. networks:
  75. - fulltest
  76. dnsrouter:
  77. image: jc21/dnsrouter
  78. volumes:
  79. - ./dev/dnsrouter-config.json.tmp:/dnsrouter-config.json:ro
  80. networks:
  81. - fulltest
  82. cypress:
  83. image: "${IMAGE}-cypress:ci-${BUILD_NUMBER}"
  84. build:
  85. context: ../
  86. dockerfile: test/cypress/Dockerfile
  87. environment:
  88. CYPRESS_baseUrl: 'http://fullstack:81'
  89. volumes:
  90. - 'cypress_logs:/results'
  91. - './dev/resolv.conf:/etc/resolv.conf:ro'
  92. command: cypress run --browser chrome --config-file=cypress/config/ci.js
  93. networks:
  94. - fulltest
  95. volumes:
  96. cypress_logs:
  97. npm_data_ci:
  98. npm_le_ci:
  99. pdns_mysql_vol:
  100. networks:
  101. fulltest:
  102. name: "npm-${BRANCH_LOWER}-ci-${BUILD_NUMBER}"