# #!bin/bash # if [ -d "/home/frappe/frappe-bench/apps/frappe" ]; then # echo "Bench already exists, skipping init" # cd frappe-bench # bench start # else # echo "Creating new bench..." # fi # export PATH="${NVM_DIR}/versions/node/v${NODE_VERSION_DEVELOP}/bin/:${PATH}" # bench init --skip-redis-config-generation frappe-bench # cd frappe-bench # # Use containers instead of localhost # bench set-mariadb-host mariadb # bench set-redis-cache-host redis://redis:6379 # bench set-redis-queue-host redis://redis:6379 # bench set-redis-socketio-host redis://redis:6379 # # Remove redis, watch from Procfile # sed -i '/redis/d' ./Procfile # sed -i '/watch/d' ./Procfile # bench get-app lms # bench new-site lms.localhost \ # --force \ # --mariadb-root-password 123 \ # --admin-password admin \ # --no-mariadb-socket # bench --site lms.localhost install-app lms # bench --site lms.localhost set-config developer_mode 1 # bench --site lms.localhost clear-cache # bench use lms.localhost # bench start #!/bin/bash if [ -d "/home/frappe/frappe-bench/apps/frappe" ]; then echo "Bench already exists, skipping init" cd /home/frappe/frappe-bench bench start else echo "Creating new bench..." fi export PATH="${NVM_DIR}/versions/node/v${NODE_VERSION_DEVELOP}/bin/:${PATH}" # Créer le bench bench init --skip-redis-config-generation /home/frappe/frappe-bench cd /home/frappe/frappe-bench # Supprimer redis & watch du Procfile (supervisord les gère) sed -i '/redis/d' ./Procfile sed -i '/watch/d' ./Procfile # Ajouter ton app LMS bench get-app lms # Créer le site bench new-site lms.localhost \ --force \ --mariadb-root-password 123 \ --admin-password admin \ --no-mariadb-socket # Installer l'application LMS bench --site lms.localhost install-app lms bench --site lms.localhost set-config developer_mode 1 bench --site lms.localhost clear-cache bench use lms.localhost # Lancer le serveur bench bench start