Advertisement
shubhamgoyal

docker-compose.yml

Apr 10th, 2018
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.47 KB | None | 0 0
  1. version: '2'
  2. services:
  3. app:
  4. build:
  5. context: .
  6. dockerfile: Dockerfile
  7. image: localhost:5000/heyman
  8. environment:
  9. - DJANGO_SETTINGS_MODULE=heyman.settings
  10. - ENV=development
  11. - PYTHONPATH=/home/ubuntu/apps/heyman/current:.
  12. - DATABASES_URL=postgres://USER:PASSWORD@HOST:PORT/NAME
  13. command: bash -c "python manage.py runserver 0.0.0.0:5000"
  14. volumes:
  15. - ./logs:/var/log/heyman
  16. - .:/home/ubuntu/apps/heyman/current
  17. volumes_from:
  18. - packages
  19. ports:
  20. - "5004:5000"
  21. depends_on:
  22. - db
  23. - redis
  24. stdin_open: true
  25. tty: true
  26.  
  27. background:
  28. command: bash -c "python manage.py process_tasks"
  29. image: localhost:5000/heyman
  30. environment:
  31. - DJANGO_SETTINGS_MODULE=heyman.settings
  32. - ENV=development
  33. - PYTHONPATH=/home/ubuntu/apps/heyman/current:.
  34. - DATABASES_URL=postgres://USER:PASSWORD@HOST:PORT/NAME
  35. volumes:
  36. - .:/home/ubuntu/apps/heyman/current
  37. - ./logs:/var/log/heyman
  38. depends_on:
  39. - app
  40.  
  41. packages:
  42. image: busybox
  43. volumes:
  44. - packages_volume:/root/.local
  45. db:
  46. image: postgres:9.4
  47. environment:
  48. - PGDATA=/var/lib/postgresql/data/pgdata
  49. ports:
  50. - "5433:5432"
  51. volumes:
  52. - ./tmp/db:/var/lib/postgresql/data/pgdata
  53. redis:
  54. image: redis
  55. ports:
  56. - "6379"
  57. - "8080"
  58.  
  59. volumes:
  60. packages_volume:
  61. external:
  62. name: packages_volume
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement