Add configuration file and update server settings
- Introduced a new `config.yaml` file for managing server, database, cache, queue, AI, scraping, logging, and rate limiting configurations. - Updated `docker-compose.yml` to reflect the new server port (8081) and adjusted health check endpoints accordingly. - Modified `Dockerfile` to expose the new server port. - Updated `README.md` to reflect changes in server configuration and added documentation for the new configuration structure. - Added test scripts for server and Swagger documentation testing. - Refactored customer domain structure to align with new configuration settings and improve maintainability.
This commit is contained in:
Executable
+26
@@ -0,0 +1,26 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "Testing Tender Management API Server..."
|
||||
|
||||
# Check if MongoDB is running
|
||||
if ! pgrep -x "mongod" > /dev/null; then
|
||||
echo "Warning: MongoDB is not running. Starting server may fail."
|
||||
echo "To start MongoDB: sudo systemctl start mongod"
|
||||
fi
|
||||
|
||||
# Build the server
|
||||
echo "Building server..."
|
||||
go build -o bin/web ./cmd/web
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Build failed!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Build successful!"
|
||||
|
||||
# Test the health endpoint (if server starts)
|
||||
echo "Testing health endpoint..."
|
||||
timeout 5s curl -s http://localhost:8081/health || echo "Server not responding (expected if MongoDB is not running)"
|
||||
|
||||
echo "Test completed!"
|
||||
Reference in New Issue
Block a user