1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-10-22 07:52:19 +03:00

Dev: Played with an all-in-one docker environment

This commit is contained in:
Dan Brown
2025-10-06 13:06:12 +01:00
parent 146a6c01cc
commit 9d1c0e5dda
10 changed files with 161 additions and 87 deletions

23
dev/docker/entrypoint.sh Normal file
View File

@@ -0,0 +1,23 @@
#!/bin/bash
echo "Starting services..."
# Start supervisord in background
sudo /usr/bin/supervisord -sc /etc/supervisor/conf.d/supervisord.conf &
# Wait for MySQL to start
echo "Waiting for MySQL to be ready..."
for i in {1..30}; do
if sudo mysqladmin -u root ping &>/dev/null; then
break
fi
sleep 1
done
# Running MySQL startup script
echo "Setting up database..."
sudo mysql -u root < /setup.sql
# Execute whatever command was passed (default: /bin/bash)
echo "Setup done! Dropping you to shell-window or command ($@)"
exec "$@"