Last active
April 13, 2024 21:41
-
-
Save iamvickyav/86472294dad254052e5c8cac93d69b05 to your computer and use it in GitHub Desktop.
docker-compose.yml for MySQL with init script
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
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