replicaV1.yml 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. version: '3'
  2. services:
  3. master:
  4. build:
  5. context: ..
  6. dockerfile: integration_tests/Dockerfile.Master
  7. command: >
  8. bash -c "
  9. dockerize -wait tcp://mq:5672 -wait tcp://postgres:5432 -timeout 60s &&
  10. echo '########################################################' &&
  11. echo ' Running compat tests Master latest - Replica v1.3.1 ' &&
  12. echo '########################################################' &&
  13. ./run_integration_tests.sh
  14. "
  15. depends_on:
  16. - mq
  17. - replica
  18. volumes:
  19. - ./tests/:/master/integration_tests/tests
  20. - ../dj_cqrs:/master/dj_cqrs
  21. environment:
  22. - CQRS_MASTER_TRANSPORT=dj_cqrs.transport.RabbitMQTransport
  23. - CQRS_BROKER_URL=amqp://mq:5672/
  24. replica:
  25. build:
  26. context: ..
  27. dockerfile: integration_tests/Dockerfile.ReplicaV1
  28. image: django_cqrs_test_replica_v1
  29. command: >
  30. bash -c "
  31. dockerize -wait tcp://mq:5672 -wait tcp://postgres:5432 -timeout 60s &&
  32. python manage.py makemigrations --settings=integration_tests.replica_settings &&
  33. python manage.py makemigrations dj_replica --settings=integration_tests.replica_settings &&
  34. python manage.py migrate --settings=integration_tests.replica_settings &&
  35. python manage.py cqrs_consume -w 2 --settings=integration_tests.replica_settings
  36. "
  37. depends_on:
  38. - mq
  39. - postgres
  40. volumes:
  41. - ../dj_cqrs:/replica/dj_cqrs
  42. environment:
  43. - POSTGRES_HOST=postgres
  44. - POSTGRES_USER=user
  45. - POSTGRES_PASSWORD=pswd
  46. - POSTGRES_DB=replica
  47. - CQRS_REPLICA_TRANSPORT=tests.dj.transport.RabbitMQTransportWithEvents
  48. - CQRS_BROKER_URL=amqp://mq:5672/