Added PostgreSQL RDS database. Added channels protected endpoints. Added scripts and docker config to run application locally in dev mode.
Some checks failed
AWS Deploy on Push / build (push) Failing after 41s
Some checks failed
AWS Deploy on Push / build (push) Failing after 41s
This commit is contained in:
19
scripts/start_local_dev.sh
Executable file
19
scripts/start_local_dev.sh
Executable file
@@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Start PostgreSQL
|
||||
docker-compose -f docker/docker-compose-db.yml up -d
|
||||
|
||||
# Set mock auth and database environment variables
|
||||
export MOCK_AUTH=true
|
||||
export DB_USER=postgres
|
||||
export DB_PASSWORD=postgres
|
||||
export DB_HOST=localhost
|
||||
export DB_NAME=iptv_updater
|
||||
|
||||
nohup uvicorn app.main:app --host 127.0.0.1 --port 8000 > app.log 2>&1 &
|
||||
echo $! > iptv-updater.pid
|
||||
|
||||
echo "Services started:"
|
||||
echo "- PostgreSQL running on localhost:5432"
|
||||
echo "- FastAPI running on http://127.0.0.1:8000"
|
||||
echo "- Mock auth enabled (use token: testuser)"
|
||||
19
scripts/stop_local_dev.sh
Executable file
19
scripts/stop_local_dev.sh
Executable file
@@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Stop FastAPI
|
||||
if [ -f iptv-updater.pid ]; then
|
||||
kill $(cat iptv-updater.pid)
|
||||
rm iptv-updater.pid
|
||||
echo "Stopped FastAPI"
|
||||
fi
|
||||
|
||||
# Clean up mock auth and database environment variables
|
||||
unset MOCK_AUTH
|
||||
unset DB_USER
|
||||
unset DB_PASSWORD
|
||||
unset DB_HOST
|
||||
unset DB_NAME
|
||||
|
||||
# Stop PostgreSQL
|
||||
docker-compose -f docker/docker-compose-db.yml down
|
||||
echo "Stopped PostgreSQL"
|
||||
Reference in New Issue
Block a user