Skip to content

Instantly share code, notes, and snippets.

@gys-dev
Last active April 15, 2022 15:16
Show Gist options
  • Save gys-dev/706758e7b20f88f5e288ca28055c7d96 to your computer and use it in GitHub Desktop.
Save gys-dev/706758e7b20f88f5e288ca28055c7d96 to your computer and use it in GitHub Desktop.
Only MySQL
version: "3"
services:
mysql:
image: mysql:5.7
container_name: mysql
environment:
MYSQL_DATABASE: 'mysql'
# We cannot set user as 'root' if mysql is below version of 5.x: https://github.com/docker-library/mysql/issues/129
# MYSQL_USER: 'root'
# MYSQL_PASSWORD: '12345678'
MYSQL_ROOT_PASSWORD: '12345678'
ports:
- "3306:3306"
volumes:
- ./data/conf.d:/etc/mysql/conf.d
- ./data/logs:/logs
- /usr/local/var/mysql:/var/lib/mysql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment