Skip to content

Instantly share code, notes, and snippets.

@housingdreams
Forked from valekar/docker-compose.yml
Created February 18, 2022 22:10
Show Gist options
  • Select an option

  • Save housingdreams/8d82f5badc631fe5b44778bc2a175572 to your computer and use it in GitHub Desktop.

Select an option

Save housingdreams/8d82f5badc631fe5b44778bc2a175572 to your computer and use it in GitHub Desktop.
Docker Compose gist for MYSQL
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