samyolo / startup.sh
regisLik
second
4fe26a6
raw
history blame contribute delete
840 Bytes
#!/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