Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # The standard now
- version: '2'
- # All of the images/containers compose will deal with
- services:
- # our strongloop service shall be known as 'api'
- api:
- # use your user name
- image: jcolemorrison/strongloop-dev
- # map the containers port of 3000 to our local 3002
- ports:
- - 3002:3000
- # mount our current directory (code) to the container's /usr/src/api
- volumes:
- - .:/usr/src/api
- # the default command unless we pass it one
- command: nodemon .
- # ADD HERE. This is what our MySQL service shall be known as
- mysqlDb:
- # This is the official MySQL 5.6 docker image
- image: mysql:5.6
- # These are required variables for the official MySQL image
- environment:
- MYSQL_ROOT_PASSWORD: "${DB_ROOT}"
- MYSQL_DATABASE: "${DB_NAME}"
- MYSQL_USER: "${DB_USER}"
- MYSQL_PASSWORD: "${DB_PWD}"
- # Keep it mapped to the usual MySQL port
- ports:
- - 3306:3306
- # Create a separate volume on our machine to map to the container's default mysql data directory
- volumes:
- - strongloopDev:/var/lib/mysql
- # These must be declared to be used above
- volumes:
- strongloopDev:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement