diff --git a/.github/workflows/terraform.yml b/.github/workflows/terraform.yml index 7fe5b79..2796de8 100644 --- a/.github/workflows/terraform.yml +++ b/.github/workflows/terraform.yml @@ -50,8 +50,8 @@ jobs: run: terraform apply -auto-approve tfplan working-directory: terraform - - name: Wait for 4 minutes - run: sleep 600 # 240 seconds equals 4 minutes + - name: Wait for 6 minutes + run: sleep 360 # 360 seconds equals 4 minutes - name: Destroy Terraform run: terraform destroy -auto-approve diff --git a/README.md b/README.md index dc20179..134d82f 100644 --- a/README.md +++ b/README.md @@ -47,3 +47,14 @@ get your aws keys from your account: https://us-east-1.console.aws.amazon.com/iam/home?region=#/users/details/?section=permissions this now runs locally - updated aws config + + +Add your PUBLIC ssh key ONLY to the terraform directory and the main.tf will use it to login to the EC2 instance interactively from local laptop. ss ubuntu@ipaddress +as usual. + +Now that poetry is used for python this will deploy any python project that +is setup correctly with poetry. + +TODO: install the project as a module with poetry build and pip or poetry install from the dist dir whl file. + +Also note that the dealy in deployment during the time the EC2 instance is up is caused by the time it takes to clone the github repo. diff --git a/src/tfgha/app.py b/src/tfgha/app.py index 302ea97..5d42457 100644 --- a/src/tfgha/app.py +++ b/src/tfgha/app.py @@ -5,7 +5,7 @@ @app.route('/') def hello(): - return "Hello from Python!" + return "Hello from Python deployed with poetry" if __name__ == '__main__':