Skip to content

Commit

Permalink
Use a separate configuration file with OTRS mysql recommended settings
Browse files Browse the repository at this point in the history
instead of replacing the values on the default musql config file. Fixes
issue #76.
  • Loading branch information
rdxmb authored and juanluisbaptiste committed May 19, 2020
1 parent e2d21e8 commit 500b630
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions mariadb/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@ ENV MYSQL_ROOT_PASSWORD changeme
USER root

#Change db configuration as required by official install docs and Enable utf8 support
RUN sed -i.bk -r '/^\[mysqld\]$/a max_allowed_packet=64M' /etc/mysql/my.cnf && \
sed -i.bk -r '/^\[mysqld\]$/a query_cache_size=32M' /etc/mysql/my.cnf && \
sed -i.bk -r '/^\[mysqld\]$/a innodb_log_file_size=256M' /etc/mysql/my.cnf && \
sed -i.bk -r '/^\[mysqld\]$/a skip-character-set-client-handshake' /etc/mysql/my.cnf && \
sed -i.bk -r "/^\[mysqld\]$/a init_connect='SET collation_connection = utf8_unicode_ci'" /etc/mysql/my.cnf && \
sed -i.bk -r '/^\[mysqld\]$/a collation-server = utf8_general_ci' /etc/mysql/my.cnf && \
sed -i.bk -r "/^\[mysqld\]$/a init-connect=\'SET NAMES utf8\'" /etc/mysql/my.cnf && \
sed -i.bk -r '/^\[mysqld\]$/a character-set-server = utf8' /etc/mysql/my.cnf
RUN echo "[mysqld]" >> /etc/mysql/conf.d/otrs.cnf &&\
echo "max_allowed_packet=64M" >> /etc/mysql/conf.d/otrs.cnf &&\
echo "query_cache_size=32M" >> /etc/mysql/conf.d/otrs.cnf &&\
echo "innodb_log_file_size=256M" >> /etc/mysql/conf.d/otrs.cnf &&\
echo "skip-character-set-client-handshake" >> /etc/mysql/conf.d/otrs.cnf &&\
echo "init-connect='SET NAMES utf8'" >> /etc/mysql/conf.d/otrs.cnf &&\
echo "init_connect='SET collation_connection = utf8_unicode_ci'" >> /etc/mysql/conf.d/otrs.cnf &&\
echo "collation-server = utf8_general_ci" >> /etc/mysql/conf.d/otrs.cnf &&\
echo "character-set-server = utf8" >> /etc/mysql/conf.d/otrs.cnf

0 comments on commit 500b630

Please sign in to comment.