Advertisement
Guest User

Untitled

a guest
Jul 20th, 2017
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.17 KB | None | 0 0
  1. # The standard now
  2. version: '2'
  3.  
  4. # All of the images/containers compose will deal with
  5. services:
  6.  
  7. # our strongloop service shall be known as 'api'
  8. api:
  9. # use your user name
  10. image: jcolemorrison/strongloop-dev
  11.  
  12. # map the containers port of 3000 to our local 3002
  13. ports:
  14. - 3002:3000
  15.  
  16. # mount our current directory (code) to the container's /usr/src/api
  17. volumes:
  18. - .:/usr/src/api
  19.  
  20. # the default command unless we pass it one
  21. command: nodemon .
  22.  
  23. # ADD HERE. This is what our MySQL service shall be known as
  24. mysqlDb:
  25.  
  26. # This is the official MySQL 5.6 docker image
  27. image: mysql:5.6
  28.  
  29. # These are required variables for the official MySQL image
  30. environment:
  31. MYSQL_ROOT_PASSWORD: "${DB_ROOT}"
  32. MYSQL_DATABASE: "${DB_NAME}"
  33. MYSQL_USER: "${DB_USER}"
  34. MYSQL_PASSWORD: "${DB_PWD}"
  35.  
  36. # Keep it mapped to the usual MySQL port
  37. ports:
  38. - 3306:3306
  39.  
  40. # Create a separate volume on our machine to map to the container's default mysql data directory
  41. volumes:
  42. - strongloopDev:/var/lib/mysql
  43.  
  44. # These must be declared to be used above
  45. volumes:
  46. strongloopDev:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement