No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

docker-compose.yml 1.2KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. version: "3"
  2. services:
  3. # Rest API
  4. rest_api:
  5. build:
  6. context: ./ypc_algorithm
  7. dockerfile: Dockerfile
  8. container_name: jobify_rest_api
  9. ports:
  10. - "8000:80"
  11. links:
  12. - db
  13. - rabbit
  14. depends_on:
  15. - db
  16. - rabbit
  17. volumes:
  18. - ./ypc_algorithm:/data # mount directory inside container
  19. # Database: MongoDB
  20. db:
  21. image: mongo:3.4
  22. container_name: jobify_db
  23. # volumes:
  24. # - ./db_data:/data/db
  25. ports:
  26. - "27017:27017"
  27. # Message Broker: RabbitMQ
  28. rabbit:
  29. image: rabbitmq:3-management-alpine
  30. container_name: jobify_rabbit
  31. ports:
  32. - "15672:15672"
  33. - "5672:5672"
  34. hostname: "rabbit1"
  35. environment:
  36. RABBITMQ_ERLANG_COOKIE: "Jaighou7Omahghahngai"
  37. RABBITMQ_DEFAULT_USER: "rabbitmq"
  38. RABBITMQ_DEFAULT_PASS: "rabbitmq"
  39. RABBITMQ_DEFAULT_VHOST: "/"
  40. # Worker: Celery
  41. worker:
  42. build: ./ypc_algorithm
  43. container_name: jobify_worker
  44. links:
  45. - db
  46. - rabbit
  47. depends_on:
  48. - rabbit
  49. - db
  50. volumes:
  51. - ./ypc_algorithm:/data # mount directory inside container
  52. command: celery -A ypc_algorithm_worker.celery_interface worker --loglevel=info