File size: 715 Bytes
c9595c6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
#!/bin/bash

echo "Starting the deployment process"

# 1. Créer une virtual environment
echo "Creating virtual environment..."
python3 -m venv venv

# 2. Activer la virtual environment
echo "Activating virtual environment..."
source venv/bin/activate

# 3. Installer les dépendances
echo "Installing dependencies..."
pip install --upgrade pip
pip install -r requirements.txt

# 4. Exécuter les fichiers Python contenant 'download' dans leur nom
echo "Running download scripts..."
for file in $(ls | grep download.*\.py); do
    echo "Executing $file..."
    python $file
done

# 5. Démarrer l'application avec Gunicorn
echo "Starting the Flask application with Gunicorn..."
gunicorn --bind 0.0.0.0:8000 app:app