diff --git a/docker-compose.yml b/docker-compose.yml index 846d703a..b964451d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -181,6 +181,23 @@ services: networks: - backend +### Percona Container ######################################### + + percona: + build: + context: ./percona + environment: + - MYSQL_DATABASE=${PERCONA_DATABASE} + - MYSQL_USER=${PERCONA_USER} + - MYSQL_PASSWORD=${PERCONA_PASSWORD} + - MYSQL_ROOT_PASSWORD=${PERCONA_ROOT_PASSWORD} + volumes: + - percona:/var/lib/mysql + ports: + - "${PERCONA_PORT}:3306" + networks: + - backend + ### MSSQL Container ######################################### mssql: @@ -545,6 +562,8 @@ networks: volumes: mysql: driver: "local" + percona: + driver: "local" mssql: driver: "local" postgres: diff --git a/env-example b/env-example index 3cf515dd..c61719b2 100644 --- a/env-example +++ b/env-example @@ -72,6 +72,13 @@ MYSQL_PASSWORD=secret MYSQL_PORT=3306 MYSQL_ROOT_PASSWORD=root +### Percona Container +PERCONA_DATABASE=homestead +PERCONA_USER=homestead +PERCONA_PASSWORD=secret +PERCONA_PORT=3306 +PERCONA_ROOT_PASSWORD=root + ### MSSQL Container MSSQL_DATABASE=homestead MSSQL_PASSWORD=yourStrong(!)Password diff --git a/percona/Dockerfile b/percona/Dockerfile new file mode 100644 index 00000000..f66d0ded --- /dev/null +++ b/percona/Dockerfile @@ -0,0 +1,11 @@ +FROM percona:5.7 + +MAINTAINER DTUNES + +RUN chown -R mysql:root /var/lib/mysql/ + +ADD my.cnf /etc/mysql/conf.d/my.cnf + +CMD ["mysqld"] + +EXPOSE 3306 diff --git a/percona/my.cnf b/percona/my.cnf new file mode 100644 index 00000000..06595ca5 --- /dev/null +++ b/percona/my.cnf @@ -0,0 +1,9 @@ +# The MySQL Client configuration file. +# +# For explanations see +# http://dev.mysql.com/doc/mysql/en/server-system-variables.html + +[mysql] + +[mysqld] +sql-mode="STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"