destroy stack before deploying new one. Created nginx configuration
All checks were successful
AWS Deploy on Push / build (push) Successful in 3m51s

This commit is contained in:
2025-05-14 23:37:41 -05:00
parent 61231e9d0f
commit 687c6a6d4e
2 changed files with 17 additions and 9 deletions

View File

@@ -15,15 +15,21 @@ cd iptv-updater-aws
pip3 install -r requirements.txt
# Create nginx config
# echo 'server {
# listen 80;
# server_name $HOSTNAME;
# location / {
# proxy_pass http://127.0.0.1:8000;
# proxy_set_header Host $host;
# proxy_set_header X-Real-IP $remote_addr;
# }
# }' > /etc/nginx/conf.d/iptvUpdater.conf
echo 'server {
listen 80;
server_name $HOSTNAME;
location / {
proxy_pass http://127.0.0.1:8000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}' > /etc/nginx/conf.d/iptvUpdater.conf
# Start nginx service
systemctl enable nginx
systemctl start nginx
# Start IptvUpdater on port 8000
nohup uvicorn app.main:app --host 127.0.0.1 --port 8000 </dev/null &>/dev/null &