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:
23
dev/docker/entrypoint.sh
Normal file
23
dev/docker/entrypoint.sh
Normal 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 "$@"
|
Reference in New Issue
Block a user