diff options
author | Navan Chauhan <navanchauhan@gmail.com> | 2023-10-08 10:28:39 -0600 |
---|---|---|
committer | Navan Chauhan <navanchauhan@gmail.com> | 2023-10-08 10:28:39 -0600 |
commit | 613702d008db69847f783516521f77b52d5183ef (patch) | |
tree | 353628d4e7bec7cfbf56cce465642318fa485393 | |
parent | 7907067adfac43fcaf7b0eb76c174669935de9be (diff) |
trying to add CD
-rw-r--r-- | appspec.yml | 17 | ||||
-rwxr-xr-x | scripts/install_dependencies.sh | 8 |
2 files changed, 25 insertions, 0 deletions
diff --git a/appspec.yml b/appspec.yml new file mode 100644 index 0000000..ba4346e --- /dev/null +++ b/appspec.yml @@ -0,0 +1,17 @@ +version: 0.0 +os: linux +files: + - source: / + destination: /home/ec2-user +hooks: + BeforeInstall: + - location: scripts/install_dependencies.sh + timeout: 300 + runas: root + - location: scripts/start_server + timeout: 300 + runas: root + ApplicationStop: + - location: scripts/stop_server + timeout: 300 + runas: root
\ No newline at end of file diff --git a/scripts/install_dependencies.sh b/scripts/install_dependencies.sh new file mode 100755 index 0000000..9bbf541 --- /dev/null +++ b/scripts/install_dependencies.sh @@ -0,0 +1,8 @@ +#!/bin/bash +if ! command -v poetry &> /dev/null +then + curl -sSL https://install.python-poetry.org | python3 - +fi + +cd /home/ec2-user +poetry install |