Skip to content

Commit

Permalink
switched to https for clone
Browse files Browse the repository at this point in the history
  • Loading branch information
proquickly committed Nov 15, 2024
1 parent 9f41be8 commit beaf734
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions terraform/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -11,39 +11,35 @@ resource "aws_instance" "py_server" {
yum update -y
yum install -y python3 python3-pip git curl
curl -sSL https://install.python-poetry.org | python3 -
export PATH="$HOME/.local/bin:$PATH"
export PATH="\$HOME/.local/bin:\$PATH"
mkdir /app
cd /app && git clone git@github.com:proquickly/tfgha.git
cd /app && git clone https://github.com/proquickly/tfgha.git
chmod +x /app/tfgha/bin/deploy
# /app/tfgha/bin/deploy
cd /app/tfgha && "$HOME/.local/bin/poetry" install
cd /app/tfgha && "$HOME/.local/bin/poetry" shell && "$HOME/.local/bin/poetry" run /app/tfgha/src/tfgha/app.py
EOF
cd /app/tfgha && \$HOME/.local/bin/poetry install
cd /app/tfgha && \$HOME/.local/bin/poetry shell && \$HOME/.local/bin/poetry run /app/tfgha/src/tfgha/app.py
EOF
tags = {
Name = "GitHubActionsEC2"
}
}

resource "aws_security_group" "allow_app" {
name = "allow_app"
description = "Allow inbound traffic for Python app"

ingress {
description = "App Port"
from_port = 5000
to_port = 5000
protocol = "tcp"
cidr_blocks = ["0.0.0.0/0"]
}

ingress {
description = "SSH"
from_port = 22
to_port = 22
protocol = "tcp"
cidr_blocks = ["0.0.0.0/0"]
}

egress {
from_port = 0
to_port = 0
Expand Down

0 comments on commit beaf734

Please sign in to comment.