From 057b3f158975958fe7641905de7e82c57576daac Mon Sep 17 00:00:00 2001 From: Stefano Date: Wed, 14 May 2025 23:00:30 -0500 Subject: [PATCH] create venv on ec2 instance and then run the app - Fix 1 --- .vscode/settings.json | 2 ++ app/__init__.py | 0 infrastructure/__init__.py | 0 infrastructure/userdata.sh | 14 -------------- requirements.txt | 7 +++---- 5 files changed, 5 insertions(+), 18 deletions(-) create mode 100644 app/__init__.py create mode 100644 infrastructure/__init__.py diff --git a/.vscode/settings.json b/.vscode/settings.json index 2dd2f31..977eb9a 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -3,6 +3,8 @@ "altinstall", "certbot", "devel", + "dotenv", + "fastapi", "fiorinis", "gitea", "iptv", diff --git a/app/__init__.py b/app/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/infrastructure/__init__.py b/infrastructure/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/infrastructure/userdata.sh b/infrastructure/userdata.sh index 19a3934..cecf1fd 100644 --- a/infrastructure/userdata.sh +++ b/infrastructure/userdata.sh @@ -12,20 +12,6 @@ cd /home/ec2-user git clone https://git.fiorinis.com/Home/iptv-updater-aws.git cd iptv-updater-aws -# Install Python 3.12 -yum install -y gcc openssl-devel bzip2-devel libffi-devel -wget https://www.python.org/ftp/python/3.12.0/Python-3.12.0.tgz -tar xzf Python-3.12.0.tgz -cd Python-3.12.0 -./configure --enable-optimizations -make altinstall -cd .. -rm -rf Python-3.12.0 Python-3.12.0.tgz - -# Create and activate virtual environment -python3.12 -m venv venv -source venv/bin/activate - pip3 install -r requirements.txt # Create nginx config diff --git a/requirements.txt b/requirements.txt index d433169..8bd71cd 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,5 @@ -fastapi==0.104.1 -uvicorn==0.24.0 +fastapi==0.103.2 aws-cdk-lib>=2.0.0 constructs>=10.0.0 -python-dotenv==1.0.0 -uvicorn==0.24.0 \ No newline at end of file +python-dotenv==0.21.1 +uvicorn==0.22.0 \ No newline at end of file