docker-compose.ci.yml 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  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. # Required for DNS Certificate provisioning in CI
  12. LE_SERVER: 'https://ca.internal/acme/acme/directory'
  13. REQUESTS_CA_BUNDLE: '/etc/ssl/certs/NginxProxyManager.crt'
  14. volumes:
  15. - 'npm_data_ci:/data'
  16. - 'npm_le_ci:/etc/letsencrypt'
  17. - './dev/letsencrypt.ini:/etc/letsencrypt.ini:ro'
  18. - './dev/resolv.conf:/etc/resolv.conf:ro'
  19. - '/etc/localtime:/etc/localtime:ro'
  20. healthcheck:
  21. test: ["CMD", "/usr/bin/check-health"]
  22. interval: 10s
  23. timeout: 3s
  24. networks:
  25. fulltest:
  26. aliases:
  27. - website1.example.com
  28. - website2.example.com
  29. - website3.example.com
  30. stepca:
  31. image: jc21/testca
  32. volumes:
  33. - './dev/resolv.conf:/etc/resolv.conf:ro'
  34. - '/etc/localtime:/etc/localtime:ro'
  35. networks:
  36. fulltest:
  37. aliases:
  38. - ca.internal
  39. pdns:
  40. image: pschiffe/pdns-mysql
  41. volumes:
  42. - '/etc/localtime:/etc/localtime:ro'
  43. environment:
  44. PDNS_master: 'yes'
  45. PDNS_api: 'yes'
  46. PDNS_api_key: 'npm'
  47. PDNS_webserver: 'yes'
  48. PDNS_webserver_address: '0.0.0.0'
  49. PDNS_webserver_password: 'npm'
  50. PDNS_webserver-allow-from: '127.0.0.0/8,192.0.0.0/8,10.0.0.0/8,172.0.0.0/8'
  51. PDNS_version_string: 'anonymous'
  52. PDNS_default_ttl: 1500
  53. PDNS_allow_axfr_ips: '127.0.0.0/8,192.0.0.0/8,10.0.0.0/8,172.0.0.0/8'
  54. PDNS_gmysql_host: pdns-db
  55. PDNS_gmysql_port: 3306
  56. PDNS_gmysql_user: pdns
  57. PDNS_gmysql_password: pdns
  58. PDNS_gmysql_dbname: pdns
  59. depends_on:
  60. - pdns-db
  61. networks:
  62. fulltest:
  63. aliases:
  64. - ns1.pdns
  65. - ns2.pdns
  66. pdns-db:
  67. image: mariadb
  68. environment:
  69. MYSQL_ROOT_PASSWORD: 'pdns'
  70. MYSQL_DATABASE: 'pdns'
  71. MYSQL_USER: 'pdns'
  72. MYSQL_PASSWORD: 'pdns'
  73. volumes:
  74. - 'pdns_mysql_vol:/var/lib/mysql'
  75. - '/etc/localtime:/etc/localtime:ro'
  76. - './dev/pdns-db.sql:/docker-entrypoint-initdb.d/01_init.sql:ro'
  77. networks:
  78. - fulltest
  79. dnsrouter:
  80. image: jc21/dnsrouter
  81. volumes:
  82. - ./dev/dnsrouter-config.json.tmp:/dnsrouter-config.json:ro
  83. networks:
  84. - fulltest
  85. cypress:
  86. image: "${IMAGE}-cypress:ci-${BUILD_NUMBER}"
  87. build:
  88. context: ../
  89. dockerfile: test/cypress/Dockerfile
  90. environment:
  91. HTTP_PROXY: 'squid:3128'
  92. HTTPS_PROXY: 'squid:3128'
  93. volumes:
  94. - 'cypress_logs:/results'
  95. - './dev/resolv.conf:/etc/resolv.conf:ro'
  96. - '/etc/localtime:/etc/localtime:ro'
  97. command: cypress run --browser chrome --config-file=cypress/config/ci.js
  98. networks:
  99. - fulltest
  100. squid:
  101. image: ubuntu/squid
  102. volumes:
  103. - './dev/squid.conf:/etc/squid/squid.conf:ro'
  104. - './dev/resolv.conf:/etc/resolv.conf:ro'
  105. - '/etc/localtime:/etc/localtime:ro'
  106. networks:
  107. - fulltest
  108. volumes:
  109. cypress_logs:
  110. npm_data_ci:
  111. npm_le_ci:
  112. pdns_mysql_vol:
  113. networks:
  114. fulltest:
  115. name: "npm-${BRANCH_LOWER}-ci-${BUILD_NUMBER}"