-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrunme.sh
More file actions
executable file
·37 lines (31 loc) · 939 Bytes
/
runme.sh
File metadata and controls
executable file
·37 lines (31 loc) · 939 Bytes
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
#!/bin/bash
set -e
# Check and create directories with correct ownership and permissions
for dir in mysql-data nginx-certs recordings; do
if [ ! -d "$dir" ]; then
echo "Creating $dir..."
mkdir -p "$dir"
else
echo "$dir already exists, skipping creation."
fi
done
echo "Setting permissions for directories..."
sudo chown -R 1000:1000 mysql-data recordings
sudo chmod -R 770 mysql-data
sudo chown -R root:root nginx-certs
sudo chmod -R 755 nginx-certs
sudo chown -R 1000:1000 recordings
sudo chmod -R 2775 recordings
echo "Directories and permissions configured."
# Run docker-compose up -d
echo "Starting containers..."
docker-compose up -d
# Run init-db.sh if it exists
if [ -f "init-db.sh" ]; then
echo "Initializing database..."
chmod +x init-db.sh
./init-db.sh
else
echo "Warning: init-db.sh not found, database initialization skipped."
fi
echo "Setup complete. Check logs with 'docker-compose logs -f'."