Skip to content

Commit

Permalink
redoing userdata
Browse files Browse the repository at this point in the history
  • Loading branch information
proquickly committed Dec 8, 2024
1 parent 3846190 commit e0eaac9
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions terraform/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -64,21 +64,24 @@ resource "aws_instance" "py_server" {
key_name = aws_key_pair.deployer.key_name
user_data = <<-EOF
#!/bin/bash
PROJ=tfgha
POETRY=/usr/local/bin
WORKDIR=/home/ubuntu
sudo apt-get update
sudo apt-get install -y python3 python3-pip git curl
curl -sSL https://install.python-poetry.org | python3 -
# python3 -m pip install -U poetry
#curl -sSL https://install.python-poetry.org | python3 -
python3 -m pip install -U poetry
cd $WORKDIR
git clone https://github.com/proquickly/$PROJ.git
cd $WORKDIR/$PROJ
export PATH="$HOME/.local/bin:$PATH"
poetry install
$POETRY/poetry install
cd $WORKDIR/$PROJ/src/$PROJ
nohup poetry run python app.py &
nohup $POETRY/poetry run python app.py &
EOF

tags = {
Expand Down

0 comments on commit e0eaac9

Please sign in to comment.