File size: 355 Bytes
372d551
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/bash
set -e

# Start MariaDB in the background
mysqld_safe --datadir=/var/lib/mysql &

# Wait for MariaDB to be ready
until mysqladmin ping --silent; do
  echo "Waiting for MariaDB..."
  sleep 2
done

# (Optional) Initialize DB/user if needed
# mysql -u root -e "CREATE DATABASE IF NOT EXISTS $MARIADB_DATABASE;"

# Start your FastAPI app
exec "$@"