#!/usr/bin/env sh
set -e

cd "$(dirname "$0")/.."

if [ ! -f .env.docker ]; then
  cp .env.docker.example .env.docker
  echo "Created .env.docker from example — please review secrets before production use."
fi

docker compose -f docker-compose.prod.yml --env-file .env.docker up -d --build

echo ""
echo "TheBet365 stack is starting."
echo "  Player:  http://localhost:${PLAYER_PORT:-8082}"
echo "  Admin:   http://localhost:${ADMIN_PORT:-8081}"
echo "  API:     exposed only inside the docker network; route it through your reverse proxy"
echo ""
echo "Check status: docker compose -f docker-compose.prod.yml ps"
