Docker functionality
This commit is contained in:
41
deploy.sh
Normal file
41
deploy.sh
Normal file
@@ -0,0 +1,41 @@
|
||||
#!/bin/bash
|
||||
# Deployment script for Jobs App
|
||||
|
||||
set -e
|
||||
|
||||
echo "🚀 Starting Jobs App deployment..."
|
||||
|
||||
# Check if Docker is installed
|
||||
if ! command -v docker &> /dev/null; then
|
||||
echo "❌ Docker is not installed. Please install Docker first."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check if docker-compose is installed
|
||||
if ! command -v docker-compose &> /dev/null; then
|
||||
echo "❌ docker-compose is not installed. Please install docker-compose first."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "📦 Building and starting services..."
|
||||
docker-compose up --build -d
|
||||
|
||||
echo "⏳ Waiting for services to be ready..."
|
||||
sleep 30
|
||||
|
||||
echo "🔍 Checking service health..."
|
||||
if curl -f http://localhost:8000/ &> /dev/null; then
|
||||
echo "✅ Jobs App is running successfully!"
|
||||
echo "🌐 Access the application at: http://localhost:8000"
|
||||
echo "📊 Admin interface: http://localhost:8000/admin/users (login: admin/M11ffpgm.)"
|
||||
echo "🔄 Scraper interface: http://localhost:8000/scrape-page"
|
||||
else
|
||||
echo "❌ Jobs App failed to start. Check logs with: docker-compose logs"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "📋 Useful commands:"
|
||||
echo " View logs: docker-compose logs -f"
|
||||
echo " Stop services: docker-compose down"
|
||||
echo " Restart: docker-compose restart"
|
||||
echo " Rebuild: docker-compose up --build"
|
||||
Reference in New Issue
Block a user