-
-
Save housingdreams/8d82f5badc631fe5b44778bc2a175572 to your computer and use it in GitHub Desktop.
Docker Compose gist for MYSQL
This file contains hidden or 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.7" | |
| services: | |
| db: | |
| image: mysql:5.7 | |
| restart: "unless-stopped" | |
| ports: | |
| - 3309:3306 | |
| # uncomment the volume mount to import .sql files | |
| # during database initalization | |
| # volumes: | |
| # - type: bind | |
| # source: ./db-dump | |
| # target: /docker-entrypoint-initdb.d | |
| environment: | |
| - MYSQL_RANDOM_ROOT_PASSWORD=true | |
| - MYSQL_USER=node_user | |
| - MYSQL_PASSWORD=node_user | |
| - MYSQL_DATABASE=practice | |
| - MYSQL_ROOT_PASSWORD=node_user | |
| command: | |
| - --character-set-server=utf8 | |
| - --collation-server=utf8_general_ci | |
| - --innodb-flush-log-at-trx-commit=0 | |
| - --transaction-isolation=READ-COMMITTED | |
| - --innodb-flush-method=O_DIRECT | |
| - --skip-log-bin | |
| - --innodb-buffer-pool-size=2G | |
| - --innodb-log-file-size=256M | |
| - --skip-ssl |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment