31 lines
713 B
Bash
31 lines
713 B
Bash
#!/bin/sh
|
|
|
|
yum update -y
|
|
yum install -y python3-pip git
|
|
amazon-linux-extras install nginx1
|
|
|
|
pip3 install --upgrade pip
|
|
pip3 install certbot certbot-nginx
|
|
|
|
cd /home/ec2-user
|
|
|
|
#git clone https://github.com/yourusername/your-repo.git",
|
|
#cd your-repo",
|
|
#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
|
|
|
|
systemctl start nginx
|
|
systemctl enable nginx
|
|
|
|
# Start IptvUpdater on port 8000
|
|
# nohup uvicorn app.main:app --host 127.0.0.1 --port 8000 & |