Skip to content

Commit

Permalink
Use mysql config.
Browse files Browse the repository at this point in the history
  • Loading branch information
kporras07 committed Mar 23, 2018
1 parent 112cc10 commit 534cb8a
Show file tree
Hide file tree
Showing 2 changed files with 121 additions and 0 deletions.
5 changes: 5 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ services:
- "3306"
networks:
- internal
volumes:
- 'humpback_database:/var/lib/mysql'
- './mysql:/etc/mysql/conf.d'

php:
build: ./php
Expand Down Expand Up @@ -141,6 +144,8 @@ services:
- 'traefik.frontend.rule=Host:mailhog.${VIRTUAL_HOST-localhost}'
- 'traefik.docker.network=humpback_proxy'
- 'traefik.port=8025'
volumes:
humpback_database: {}
networks:
humpback_proxy:
external: true
Expand Down
116 changes: 116 additions & 0 deletions mysql/my.cnf
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
#
# The MySQL database server configuration file for Lando
#

[mysqld]
#
# * Basic Settings
#
# Data is stored in a volume on the db container /sql
user = mysql
datadir = /var/lib/mysql
default-storage-engine = innodb

#
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
bind-address = 0.0.0.0
#
# * Fine Tuning
#
key_buffer_size = 384M
max_allowed_packet = 32M
thread_stack = 400K
thread_cache_size = 8
# This replaces the startup script and checks MyISAM tables if needed
# the first time they are touched
#max_connections = 100
#table_cache = 64
#thread_concurrency = 10
read_rnd_buffer_size = 8M
myisam_sort_buffer_size = 64M
table_open_cache = 512
sort_buffer_size = 2M
read_buffer_size = 2M

#
# * Query Cache Configuration
#
query_cache_limit = 1M
query_cache_size = 64M
#
# * Logging and Replication
#
# Both location gets rotated by the cronjob.
# Be aware that this log type is a performance killer.
# As of 5.1 you can enable the log at runtime!
#general_log_file = /src/.lando/log/mysql.log
#general_log = 1
#
# Error logging goes to syslog due to /etc/mysql/conf.d/mysqld_safe_syslog.cnf.
#
# Here you can see queries with especially long duration
#log_slow_queries = /var/log/mysql/mysql-slow.log
#long_query_time = 2
#log-queries-not-using-indexes
#
# The following can be used as easy to replay backup logs or for replication.
# note: if you are setting up a replication slave, see README.Debian about
# other settings you may need to change.
#server-id = 1
#log_bin = /src/.lando/log/mysql-bin.log
expire_logs_days = 10
max_binlog_size = 100M
#binlog_do_db = include_database_name
#binlog_ignore_db = include_database_name
#
# * InnoDB
#
# InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.
# Read the manual for more InnoDB related options. There are many!
#
# Uncomment the following if you are using InnoDB tables
#innodb_data_file_path = ibdata1:2000M;ibdata2:10M:autoextend
#innodb_log_group_home_dir = C:\mysql\data/
# You can set .._buffer_pool_size up to 50 - 80 %
# of RAM but beware of setting memory usage too high
#innodb_buffer_pool_size = 384M
#innodb_additional_mem_pool_size = 20M
# Set .._log_file_size to 25 % of buffer pool size
innodb_log_file_size = 100M
#innodb_log_buffer_size = 8M
innodb_flush_log_at_trx_commit = 0
#innodb_lock_wait_timeout = 50
innodb_buffer_pool_size = 384M
innodb_log_buffer_size = 4M
innodb_file_per_table = 1
innodb_open_files = 256
innodb_io_capacity = 512
innodb_flush_method = O_DIRECT
innodb_thread_concurrency = 8
innodb_lock_wait_timeout = 120
#
# * Security Features
#
# Read the manual, too, if you want chroot!
# chroot = /var/lib/mysql/
#
# For generating SSL certificates I recommend the OpenSSL GUI "tinyca".
#
# ssl-ca=/etc/mysql/cacert.pem
# ssl-cert=/etc/mysql/server-cert.pem
# ssl-key=/etc/mysql/server-key.pem

[mysqldump]
quick
quote-names
max_allowed_packet = 32M

[mysql]
#no-auto-rehash # faster start of mysql but no tab completition

[isamchk]
key_buffer_size = 384M
sort_buffer_size = 256M
read_buffer = 2M
write_buffer = 2M

0 comments on commit 534cb8a

Please sign in to comment.