Files
jobs/deploy.sh
georg.sinn-schirwitz 5940e1f8b4 Docker functionality
2025-09-08 14:51:04 +02:00

42 lines
1.2 KiB
Bash

#!/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"