#!/bin/bash

echo "Starting Lawn Scheduler in Production Mode..."

# Go to root directory
cd "$(dirname "$0")/.." || exit 1

# Create necessary directories
mkdir -p nginx/conf.d
mkdir -p uploads

# Build and start services
docker compose down
docker compose build --no-cache
docker compose up -d

echo "Application started!"
echo "Access the application at: http://localhost"
echo ""
echo "To view logs: docker compose logs -f"
echo "To stop: docker compose down"