Spaces:
Sleeping
Sleeping
File size: 1,064 Bytes
3b9dd5d 1201570 3b9dd5d 1201570 3b9dd5d de34df9 4347c70 6fee893 3b9dd5d af12caa 3b9dd5d 4347c70 3b9dd5d 6fee893 |
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
# cd backend
# # Start FastAPI app in the background on port 8000
# uvicorn app:app --host 0.0.0.0 --port 8000 --reload &
# # Start Nginx
# nginx -g 'daemon off;'
#!/bin/bash
# Start Nginx
echo "Starting Nginx..."
service nginx start
service nginx status
curl http://localhost:8080
curl http://localhost:8080/custom-auth
# Assuming your backend server is a Python application that you want to run on port 8000.
# Adjust the command below to match how you start your backend server.
echo "Starting Backend Server..."
cd backend # Navigate to your backend directory if needed
# Replace `python app.py` with the command you use to start your backend server.
# Make sure to run it in the background so the script can continue and not block.
# python app.py &
uvicorn app:app --host 0.0.0.0 --port 8000 --reload &
# Keep the script running to prevent the Docker container from exiting.
# This is necessary because running the backend server in the background
# would make the script exit immediately otherwise.
curl http://localhost:8000
wait
exit $? |