diff --git a/mysql/Dockerfile b/mysql/Dockerfile index 2358188..877869c 100644 --- a/mysql/Dockerfile +++ b/mysql/Dockerfile @@ -12,6 +12,7 @@ ENV TERM xterm COPY sei-db-ref-executivo/mysql/sei_3_0_0_BD_Ref_Exec.sql /tmp/sei_mysql.sql COPY sei-db-ref-executivo/mysql/sip_3_0_0_BD_Ref_Exec.sql /tmp/sip_mysql.sql +COPY assets/my.cnf /etc/my.cnf COPY install.sh /install.sh COPY entrypoint.sh /entrypoint.sh diff --git a/mysql/assets/my.cnf b/mysql/assets/my.cnf new file mode 100644 index 0000000..9374edd --- /dev/null +++ b/mysql/assets/my.cnf @@ -0,0 +1,35 @@ +# For advice on how to change settings please see +# http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html + +[mysqld] +# +# Remove leading # and set to the amount of RAM for the most important data +# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%. +# innodb_buffer_pool_size = 128M +# +# Remove leading # to turn on a very important data integrity option: logging +# changes to the binary log between backups. +# log_bin +# +# Remove leading # to set options mainly useful for reporting servers. +# The server defaults are faster for transactions and fast SELECTs. +# Adjust sizes as needed, experiment to find the optimal values. +# join_buffer_size = 128M +# sort_buffer_size = 2M +# read_rnd_buffer_size = 2M +datadir=/var/lib/mysql +socket=/var/lib/mysql/mysql.sock + + +# Disabling symbolic-links is recommended to prevent assorted security risks +symbolic-links=0 + +# Recommended in standard MySQL setup +# sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES +sql-mode=STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION +max_allowed_packet=268435456 + +[mysqld_safe] +log-error=/var/log/mysqld.log +pid-file=/var/run/mysqld/mysqld.pid + diff --git a/mysql/install.sh b/mysql/install.sh index 7abcaa7..95660a7 100644 --- a/mysql/install.sh +++ b/mysql/install.sh @@ -46,10 +46,6 @@ mysql -e "update orgao set sin_autenticar='N' where id_orgao=0;" sip # Atribuição de permissões de acesso externo para o usuário root, senha root mysql -e "GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'root' WITH GRANT OPTION;" -# Correção de problema com o registro de log de documentos contendo imagens -echo "max_allowed_packet=268435456" >> /etc/my.cnf -echo "sql-mode=STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION" >> /etc/my.cnf - # Remover arquivos temporários rm -rf /tmp/* yum clean all -- libgit2 0.21.2