Skip to content

Commit 9d04cd5

Browse files
author
Automation
committed
feat: auto-execute create_tables.sql in deploy.sh
1 parent d82f410 commit 9d04cd5

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

deploy.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,13 @@ for i in {1..30}; do
3333
sleep 2
3434
done
3535

36+
echo "Initializing database with create_tables.sql..."
37+
if curl -s https://raw.githubusercontent.com/Evolvus/github-smart/main/create_tables.sql | docker exec -i ${MYSQL_NAME} mysql -u root -p"${MYSQL_ROOT_PASSWORD:-github_smart_root_password}" "${DB_NAME:-project_management}"; then
38+
echo "Database initialization completed successfully"
39+
else
40+
echo "Warning: Database initialization failed, but continuing..."
41+
fi
42+
3643
echo "Starting/Restarting app container..."
3744
docker rm -f ${APP_NAME} >/dev/null 2>&1 || true
3845
docker run -d \

0 commit comments

Comments
 (0)