Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow proxysql entrypoint to work with helm config #1065

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion proxysql/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -98,4 +98,4 @@ VOLUME /var/lib/proxysql
ENTRYPOINT ["/entrypoint.sh"]

EXPOSE 3306 6032
CMD ["/usr/bin/proxysql", "-f", "-c", "/etc/proxysql/proxysql.cnf", "--reload"]
CMD ["/usr/bin/proxysql", "-f", "-c", "/etc/proxysql.cnf", "--reload"]
4 changes: 3 additions & 1 deletion proxysql/dockerdir/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@

set -o xtrace

PROXY_CFG=/etc/proxysql/proxysql.cnf
PROXY_CFG_SRC=/etc/proxysql/proxysql.cnf
PROXY_CFG=/etc/proxysql.cnf
PROXY_ADMIN_CFG=/etc/proxysql-admin.cnf

MYSQL_INTERFACES='0.0.0.0:3306;0.0.0.0:33062'
CLUSTER_PORT='33062'
sed "s/#export WRITERS_ARE_READERS=.*$/export WRITERS_ARE_READERS='yes'/g" ${PROXY_ADMIN_CFG} 1<>${PROXY_ADMIN_CFG}

cp ${PROXY_CFG_SRC} ${PROXY_CFG}
sed "s/interfaces=\"0.0.0.0:3306\"/interfaces=\"${MYSQL_INTERFACES:-0.0.0.0:3306}\"/g" ${PROXY_CFG} 1<>${PROXY_CFG}
sed "s/stacksize=1048576/stacksize=${MYSQL_STACKSIZE:-1048576}/g" ${PROXY_CFG} 1<>${PROXY_CFG}
sed "s/threads=2/threads=${MYSQL_THREADS:-2}/g" ${PROXY_CFG} 1<>${PROXY_CFG}
Expand Down