my_project / entrypoint.sh
Ayushdavidkushwahaaaa's picture
Update entrypoint.sh
b554606 verified
raw
history blame contribute delete
498 Bytes
#!/bin/sh
set -e # Exit on any error
echo "Starting Rasa server..."
# Train the model if not found
if [ ! -d "models" ] || [ -z "$(ls -A models)" ]; then
echo "No trained model found. Training a new model..."
rasa train
fi
# Start the Rasa server
rasa run -m models --enable-api --cors "*" --debug --port 5005 &
# Allow Rasa server some time to initialize
sleep 5
# Start the Rasa Actions server
rasa run actions --actions actions --debug --port 5055 &
# Keep the container running
wait