Changed project name to be IPTV Manager Service
All checks were successful
AWS Deploy on Push / build (push) Successful in 8m29s
All checks were successful
AWS Deploy on Push / build (push) Successful in 8m29s
This commit is contained in:
@@ -1,21 +1,26 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
# Start PostgreSQL
|
||||
docker-compose -f docker/docker-compose-db.yml up -d
|
||||
|
||||
# Set mock auth and database environment variables
|
||||
# Set environment variables
|
||||
export MOCK_AUTH=true
|
||||
export DB_HOST=localhost
|
||||
export DB_USER=postgres
|
||||
export DB_PASSWORD=postgres
|
||||
export DB_HOST=localhost
|
||||
export DB_NAME=iptv_updater
|
||||
export DB_NAME=iptv_manager
|
||||
|
||||
echo "Ensuring database $DB_NAME exists using conditional DDL..."
|
||||
PGPASSWORD=$DB_PASSWORD docker exec -i postgres psql -U $DB_USER <<< "SELECT 'CREATE DATABASE $DB_NAME' WHERE NOT EXISTS (SELECT FROM pg_database WHERE datname = '$DB_NAME')\gexec"
|
||||
echo "Database $DB_NAME check complete."
|
||||
|
||||
# Run database migrations
|
||||
alembic upgrade head
|
||||
|
||||
# Start FastAPI
|
||||
nohup uvicorn app.main:app --host 127.0.0.1 --port 8000 > app.log 2>&1 &
|
||||
echo $! > iptv-updater.pid
|
||||
echo $! > iptv-manager.pid
|
||||
|
||||
echo "Services started:"
|
||||
echo "- PostgreSQL running on localhost:5432"
|
||||
|
||||
Reference in New Issue
Block a user