1
0
mirror of https://github.com/mailcow/mailcow-dockerized.git synced 2025-12-24 07:11:32 +00:00

[Mysql] use python bootstrapper to start MYSQL container

This commit is contained in:
FreddleSpl0it
2025-05-22 07:54:29 +02:00
parent 55d90afee4
commit faf8fa8c2c
8 changed files with 138 additions and 5 deletions

View File

@@ -0,0 +1,20 @@
#!/bin/bash
# Run hooks
for file in /hooks/*; do
if [ -x "${file}" ]; then
echo "Running hook ${file}"
"${file}"
fi
done
python3 -u /bootstrap/main.py
BOOTSTRAP_EXIT_CODE=$?
if [ $BOOTSTRAP_EXIT_CODE -ne 0 ]; then
echo "Bootstrap failed with exit code $BOOTSTRAP_EXIT_CODE. Not starting MariaDB."
exit $BOOTSTRAP_EXIT_CODE
fi
echo "Bootstrap succeeded. Starting MariaDB..."
exec gosu mysql "$@"