Skip to content

Instantly share code, notes, and snippets.

@iamvickyav
Last active April 13, 2024 21:41
Show Gist options
  • Save iamvickyav/86472294dad254052e5c8cac93d69b05 to your computer and use it in GitHub Desktop.
Save iamvickyav/86472294dad254052e5c8cac93d69b05 to your computer and use it in GitHub Desktop.
docker-compose.yml for MySQL with init script
version : '3'
services:
mysql:
image: mysql
command: --default-authentication-plugin=mysql_native_password
environment:
MYSQL_ROOT_PASSWORD: root
ports:
- "3306:3306"
volumes:
- "./scripts/schema.sql:/docker-entrypoint-initdb.d/1.sql"
- "./scripts/data.sql:/docker-entrypoint-initdb.d/2.sql"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment