forked from guaycuru/gde
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·42 lines (36 loc) · 1.21 KB
/
setup.sh
File metadata and controls
executable file
·42 lines (36 loc) · 1.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/bash
# GDE Setup Script for Docker
echo "Setting up GDE database..."
# Wait for MySQL to be ready
echo "Waiting for MySQL to be ready..."
until docker-compose exec db mysql -u root -proot -e "SELECT 1" >/dev/null 2>&1; do
sleep 2
done
echo "MySQL is ready!"
# Create a simple table for testing
docker-compose exec db mysql -u root -proot -e "
USE gde;
CREATE TABLE IF NOT EXISTS test_table (
id INT AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(100),
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
INSERT INTO test_table (name) VALUES ('Test data');
"
echo "Database setup complete!"
echo ""
echo "Application URLs:"
echo "- Main application: http://localhost:8080"
echo "- phpMyAdmin: http://localhost:8081"
echo ""
echo "Database credentials:"
echo "- Host: db (from inside container) or localhost:3306 (from host)"
echo "- Database: gde"
echo "- Username: Web"
echo "- Password: gde123"
echo "- Root password: root"
echo ""
echo "Note: According to the README, you should download and import the full database:"
echo "1. Download gde_pacote.zip from https://gde.guaycuru.net/gde_pacote.zip"
echo "2. Extract the SQL file"
echo "3. Import it using: docker-compose exec db mysql -u root -proot gde < gde_pacote.sql"