Created
March 20, 2018 18:56
-
-
Save lvthillo/28fa2606613c56c3ac94ba9499689c3a to your computer and use it in GitHub Desktop.
docker-compose.yaml to deploy a MySQL Docker container
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
services: | |
mysql: | |
image: mysql:5.7 | |
container_name: mysql | |
volumes: | |
- mysql-volume:/var/lib/mysql | |
environment: | |
MYSQL_ROOT_PASSWORD: root | |
MYSQL_DATABASE: db | |
MYSQL_USER: blog-user | |
MYSQL_PASSWORD: supersecret |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
please add
volumes:
mysql-volume:
to the end of this file, and add
version: '2'
to the start