Initialisation depot
This commit is contained in:
35
arti-api/serve-docs.sh
Executable file
35
arti-api/serve-docs.sh
Executable file
@@ -0,0 +1,35 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Swagger Documentation Server
|
||||
# This script starts a simple HTTP server to serve the OpenAPI documentation
|
||||
|
||||
echo "Starting Swagger Documentation Server..."
|
||||
echo "Building the container first..."
|
||||
|
||||
# Build the container
|
||||
docker build -t arti-api:latest .
|
||||
|
||||
# Start the container in the background
|
||||
echo "Starting Arti-API container..."
|
||||
docker run -d \
|
||||
--name arti-api-docs \
|
||||
-p 8000:8000 \
|
||||
-v $(pwd)/data:/data \
|
||||
arti-api:latest
|
||||
|
||||
# Wait a moment for the server to start
|
||||
sleep 3
|
||||
|
||||
echo ""
|
||||
echo "🚀 Arti-API Documentation is now available at:"
|
||||
echo ""
|
||||
echo " 📖 Interactive API Docs (Swagger UI): http://localhost:8000/docs"
|
||||
echo " 📋 Alternative Docs (ReDoc): http://localhost:8000/redoc"
|
||||
echo " 🔧 OpenAPI JSON Schema: http://localhost:8000/openapi.json"
|
||||
echo " ❤️ Health Check: http://localhost:8000/health"
|
||||
echo ""
|
||||
echo "To stop the documentation server:"
|
||||
echo " docker stop arti-api-docs && docker rm arti-api-docs"
|
||||
echo ""
|
||||
echo "To view logs:"
|
||||
echo " docker logs -f arti-api-docs"
|
||||
Reference in New Issue
Block a user