Advertisement
Guest User

Untitled

a guest
Jul 20th, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. version: '2'
  2. services:
  3. db:
  4. image: postgres
  5. web:
  6. build: .
  7. command: python manage.py runserver 0.0.0.0:8000
  8. volumes:
  9. - .:/code
  10. ports:
  11. - "8000:8000"
  12. depends_on:
  13. - db
  14.  
  15. docker run -d --name=test-mysql --env="MYSQL_ROOT_PASSWORD=mypassword" -P mysql
  16.  
  17. docker inspect d54cf8a0fb98 |grep HostPort
  18.  
  19. "HostPort": "32777"
  20.  
  21. web:
  22. links:
  23. - db
  24.  
  25. version: '2'
  26. services:
  27. web:
  28. build: .
  29. depends_on:
  30. - db
  31. - redis
  32. redis:
  33. image: redis
  34. db:
  35. image: postgres
  36.  
  37. web:
  38. image: example/my_web_app:latest
  39. links:
  40. - db
  41. - cache
  42.  
  43. db:
  44. image: postgres:latest
  45.  
  46. cache:
  47. image: redis:latest
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement