File size: 840 Bytes
c9595c6 4fe26a6 c9595c6 4fe26a6 c9595c6 4fe26a6 c9595c6 4fe26a6 c9595c6 4fe26a6 c9595c6 4fe26a6 |
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
echo "Starting the deployment process"
# 1. Changer les permissions de tous les fichiers en 777
echo "Changing permissions for all files to 777..."
chmod -R 777 .
# 2. Créer une virtual environment
echo "Creating virtual environment..."
python3 -m venv venv
# 3. Activer la virtual environment
echo "Activating virtual environment..."
source venv/bin/activate
# 4. Installer les dépendances
echo "Installing dependencies..."
pip install --upgrade pip
pip install -r requirements.txt
# 5. 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
# 6. Démarrer l'application avec Gunicorn
echo "Starting the Flask application with Gunicorn..."
gunicorn --bind 0.0.0.0:7860 app:app
|