Skip to content

Instantly share code, notes, and snippets.

@lvthillo
Created March 20, 2018 18:56
Show Gist options
  • Save lvthillo/28fa2606613c56c3ac94ba9499689c3a to your computer and use it in GitHub Desktop.
Save lvthillo/28fa2606613c56c3ac94ba9499689c3a to your computer and use it in GitHub Desktop.
docker-compose.yaml to deploy a MySQL Docker container
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
@3bars
Copy link

3bars commented Apr 18, 2020

please add

volumes:
mysql-volume:

to the end of this file, and add

version: '2'

to the start

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment