Added in_use and priority_id field for channels urls. Added priorities table. Setup sql alchemy migration. Generate first migration.
All checks were successful
AWS Deploy on Push / build (push) Successful in 2m4s

This commit is contained in:
2025-05-26 21:24:41 -05:00
parent 76dc8908de
commit 21cc99eff6
15 changed files with 547 additions and 35 deletions

View File

@@ -35,7 +35,7 @@ for INSTANCE_ID in $INSTANCE_IDS; do
aws ssm send-command \
--instance-ids "$INSTANCE_ID" \
--document-name "AWS-RunShellScript" \
--parameters '{"commands":["cd /home/ec2-user/iptv-updater-aws && git pull && pip3 install -r requirements.txt && sudo systemctl restart iptv-updater"]}' \
--parameters '{"commands":["cd /home/ec2-user/iptv-updater-aws && git pull && pip3 install -r requirements.txt && alembic upgrade head && sudo systemctl restart iptv-updater"]}' \
--no-cli-pager \
--no-paginate
done

View File

@@ -2,4 +2,10 @@
# Install dependencies and deploy infrastructure
npm install -g aws-cdk
python3 -m pip install -r requirements.txt
python3 -m pip install -r requirements.txt
# Initialize and run database migrations
alembic upgrade head
# Seed initial data
python3 -c "from app.utils.database import SessionLocal; from app.models.db import Priority; db = SessionLocal(); db.add_all([Priority(id=100, description='High'), Priority(id=200, description='Medium'), Priority(id=300, description='Low')]); db.commit()"

View File

@@ -10,6 +10,10 @@ export DB_PASSWORD=postgres
export DB_HOST=localhost
export DB_NAME=iptv_updater
# 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