From 0eaab828ba56c7c53e64226fef6550c1ded3fd50 Mon Sep 17 00:00:00 2001 From: Alex Yang <32620988+DatProJack@users.noreply.github.com> Date: Wed, 10 Apr 2024 11:50:47 -0500 Subject: [PATCH] codedeploy scripts --- appspec.yml | 18 ++++++++++++++++++ scripts/build.sh | 2 ++ scripts/install_dependencies.sh | 2 ++ scripts/reload_server.sh | 2 ++ 4 files changed, 24 insertions(+) create mode 100644 appspec.yml create mode 100644 scripts/build.sh create mode 100644 scripts/install_dependencies.sh create mode 100644 scripts/reload_server.sh diff --git a/appspec.yml b/appspec.yml new file mode 100644 index 0000000..68f2cd7 --- /dev/null +++ b/appspec.yml @@ -0,0 +1,18 @@ +version: 0.0 +os: linux +files: + - source: / + destination: /home/ubuntu/rp-api +hooks: + BeforeInstall: + - location: scripts/install_dependencies.sh + timeout: 300 + runas: root + AfterInstall: + - location: scripts/build.sh + timeout: 300 + runas: root + ApplicationStart: + - location: scripts/reload_server.sh + timeout: 300 + runas: root \ No newline at end of file diff --git a/scripts/build.sh b/scripts/build.sh new file mode 100644 index 0000000..db96fbc --- /dev/null +++ b/scripts/build.sh @@ -0,0 +1,2 @@ +#!/bin/bash +tsc \ No newline at end of file diff --git a/scripts/install_dependencies.sh b/scripts/install_dependencies.sh new file mode 100644 index 0000000..434f311 --- /dev/null +++ b/scripts/install_dependencies.sh @@ -0,0 +1,2 @@ +#!/bin/bash +yarn \ No newline at end of file diff --git a/scripts/reload_server.sh b/scripts/reload_server.sh new file mode 100644 index 0000000..4887fc2 --- /dev/null +++ b/scripts/reload_server.sh @@ -0,0 +1,2 @@ +#!/bin/bash +pm2 reload RP_API \ No newline at end of file