updated docker compose files
This commit is contained in:
88
deploy.sh
Executable file
88
deploy.sh
Executable file
@@ -0,0 +1,88 @@
|
||||
#!/bin/bash
|
||||
# Quick deployment script for Recticel Quality Application
|
||||
|
||||
set -e
|
||||
|
||||
echo "================================================"
|
||||
echo " Recticel Quality Application"
|
||||
echo " Docker Deployment"
|
||||
echo "================================================"
|
||||
echo ""
|
||||
|
||||
# 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 "✅ Docker and Docker Compose are installed"
|
||||
echo ""
|
||||
|
||||
# Create .env if it doesn't exist
|
||||
if [ ! -f .env ]; then
|
||||
echo "Creating .env file from template..."
|
||||
cp .env.example .env
|
||||
echo "✅ Created .env file"
|
||||
echo "⚠️ Please review .env and update passwords before production use"
|
||||
echo ""
|
||||
fi
|
||||
|
||||
# Create necessary directories
|
||||
echo "Creating necessary directories..."
|
||||
mkdir -p logs instance
|
||||
echo "✅ Directories created"
|
||||
echo ""
|
||||
|
||||
# Stop any existing services
|
||||
echo "Stopping any existing services..."
|
||||
docker-compose down 2>/dev/null || true
|
||||
echo ""
|
||||
|
||||
# Build and start services
|
||||
echo "Building Docker images..."
|
||||
docker-compose build
|
||||
echo ""
|
||||
|
||||
echo "Starting services..."
|
||||
docker-compose up -d
|
||||
echo ""
|
||||
|
||||
# Wait for services to be ready
|
||||
echo "Waiting for services to be ready..."
|
||||
sleep 10
|
||||
|
||||
# Check status
|
||||
echo ""
|
||||
echo "================================================"
|
||||
echo " Deployment Status"
|
||||
echo "================================================"
|
||||
docker-compose ps
|
||||
echo ""
|
||||
|
||||
# Show access information
|
||||
echo "================================================"
|
||||
echo " ✅ Deployment Complete!"
|
||||
echo "================================================"
|
||||
echo ""
|
||||
echo "Application URL: http://localhost:8781"
|
||||
echo ""
|
||||
echo "Default Login Credentials:"
|
||||
echo " Username: superadmin"
|
||||
echo " Password: superadmin123"
|
||||
echo ""
|
||||
echo "⚠️ IMPORTANT: Change the default password after first login!"
|
||||
echo ""
|
||||
echo "Useful Commands:"
|
||||
echo " View logs: docker-compose logs -f"
|
||||
echo " Stop services: docker-compose down"
|
||||
echo " Restart: docker-compose restart"
|
||||
echo " Shell access: docker-compose exec web bash"
|
||||
echo ""
|
||||
echo "For more information, see DOCKER_DEPLOYMENT.md"
|
||||
echo ""
|
||||
Reference in New Issue
Block a user