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

/docker-entrypoint-initdb.d/my_init_script.sh (helm install) #54

Open
bsfelton opened this issue Feb 6, 2024 · 1 comment
Open

/docker-entrypoint-initdb.d/my_init_script.sh (helm install) #54

bsfelton opened this issue Feb 6, 2024 · 1 comment

Comments

@bsfelton
Copy link

bsfelton commented Feb 6, 2024

So this script that is run to initialize the MySQL database in helm install is not completing because the script calls for curl, which is not in the docker image; see logs below.

Create vapi db ...
mysql: [Warning] Using a password on the command line interface can be insecure.
2024-02-06T14:04:04.303299Z 10 [Warning] [MY-013360] [Server] Plugin mysql_native_password reported: ''mysql_native_password' is deprecated and will be removed in a future release. Please use caching_sha2_password instead'
Curling vapi.sql ...
/docker-entrypoint-initdb.d/my_init_script.sh: line 6: curl: command not found

@bsfelton
Copy link
Author

bsfelton commented Feb 6, 2024

here is the script that is in the values.yml file

initdbScripts:
my_init_script.sh: |
#!/bin/bash
export MYSQL_ROOT_PASSWORD=vapi123456 # This must match the auth.rootPassword above
echo "Create vapi db ..."
mysql -P 3306 -uroot -p$MYSQL_ROOT_PASSWORD -e "CREATE DATABASE IF NOT EXISTS vapi";
echo "Curling vapi.sql ..."
curl https://raw.githubusercontent.com/roottusk/vapi/master/database/vapi.sql -o /tmp/vapi.sql
echo "Importing sql ..."
mysql -u root -p$MYSQL_ROOT_PASSWORD vapi < /tmp/vapi.sql

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant