Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions app-validate
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash
sleep 10
nc -zv 127.0.0.1 80
27 changes: 27 additions & 0 deletions appsec.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
version: 0.0
os: linux
files:
- source: /
destination: /home/ec2-user/my-app

permissions:
- object: /
pattern: "**"
owner: ec2-user
group: ec2-user

hooks:
AfterInstall:
- location: install_dependencies
timeout: 1200
runas: ec2-user

ApplicationStart:
- location: start_server
timeout: 60
runas: ec2-user

ValidateService:
- location: app-validate
timeout: 10
runas: ec2-user
1 change: 1 addition & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
test
8 changes: 8 additions & 0 deletions install_dependencies
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

yum -y update
curl --silent --location https://rpm.nodesource.com/setup_4.x | bash -
yum -y install nodejs
npm install -g pm2
npm install
pm2 update
2 changes: 2 additions & 0 deletions start_server
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
npm start