-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.sh
More file actions
32 lines (26 loc) · 905 Bytes
/
run.sh
File metadata and controls
32 lines (26 loc) · 905 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
#!/bin/bash
# Define the directory for MinIO data
minio_data_dir="./apps/minio_data"
# Check if the directory exists
if [ -d "$minio_data_dir" ]; then
echo "Directory $minio_data_dir exists. Cleaning it..."
# Remove all files in the directory
rm -rf "$minio_data_dir/*"
else
echo "Directory $minio_data_dir doesn't exist. Creating it..."
# Create the directory if it doesn't exist
mkdir -p "$minio_data_dir"
fi
# Create a Python virtual environment
echo "Creating Python virtual environment..."
python -m venv venv
# Activate the virtual environment
echo "Activating virtual environment..."
source venv/bin/activate
# Install required packages from requirements.txt
echo "Installing requirements from requirements.txt..."
pip install -r requirements.txt
# Running Docker Compose
echo "Running Docker Compose..."
docker-compose --env-file ./docker_compose_keys.env up -d
python3 ./main.py