#!/bin/bash set -e echo "Initializing database..." cd /opt/trademate/backend if [ ! -f .env ]; then echo "Creating .env from .env.example..." cp .env.example .env echo "Please edit .env with your actual configuration!" fi echo "Running Alembic migrations..." alembic upgrade head echo "Database initialized successfully!"