Guest User

Untitled

a guest
Apr 10th, 2018
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.39 KB | None | 0 0
  1. version: "3"
  2. services:
  3. # PostgreSQL
  4. db:
  5. image: postgres:9.4
  6. hostname: db
  7. environment:
  8. - POSTGRES_USER=postgres
  9. - POSTGRES_PASSWORD=postgres
  10. - POSTGRES_DB=postgres
  11. ports:
  12. - "5432:5432"
  13. # Redis
  14. redis:
  15. image: redis:2.8.19
  16. hostname: redis
  17. ports:
  18. - "6379:6379"
  19. # RabbitMQ
  20. rabbit:
  21. hostname: rabbit
  22. image: rabbitmq:3.6.0
  23. environment:
  24. - RABBITMQ_DEFAULT_USER=admin
  25. - RABBITMQ_DEFAULT_PASS=mypass
  26. ports:
  27. - "5672:5672" # We forward this port because it's useful for debugging
  28. - "15672:15672" # Here, we can access RabbitMQ management plugin
  29. # Django
  30. web:
  31. build:
  32. context: .
  33. dockerfile: Dockerfile
  34. hostname: web
  35. command: python ./manage.py runserver 0.0.0.0:8000
  36. volumes:
  37. # Mount src to app
  38. - ./src:/app
  39. expose:
  40. - "8000"
  41. depends_on:
  42. - db
  43. restart: always
  44. lb:
  45. image: dockercloud/haproxy
  46. # Recommended way is using networks instead of links
  47. links:
  48. - web
  49. volumes:
  50. # Mount unix socket for back communication (needs to be updated)
  51. - /var/run/docker.sock:/var/run/docker.sock
  52. ports:
  53. - "80:80"
  54. # Celery
  55. worker:
  56. build:
  57. context: .
  58. dockerfile: Dockerfile
  59. command: celery worker -A imagestore.celeryconf -Q default -n default@%h
  60. volumes:
  61. - ./src:/app
  62. depends_on:
  63. - web
  64. - rabbit
Add Comment
Please, Sign In to add comment