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
15 changes: 15 additions & 0 deletions appsepc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
version: 0.0
os: linux
files:
- source: /
destination: /home/ec2-user/Personal-expense-Tracker
overwrite: true
hooks:
AfterInstall:
- location: scripts/after_install.sh
timeout: 300
runas: ec2-user
ApplicationStart:
- location: scripts/start_service.sh
timeout: 300
runas: ec2-user
14 changes: 14 additions & 0 deletions appspec.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
version: 0.0
os: linux
files:
- source: /
destination: /home/ec2-user/Personal-expense-Tracker
hooks:
AfterInstall:
- location: scripts/after_install.sh
timeout: 600
runas: ec2-user
ApplicationStart:
- location: scripts/start_service.sh
timeout: 300
runas: ec2-user
6 changes: 6 additions & 0 deletions scripts/after_install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash
set -e
cd /home/ec2-user/Personal-expense-Tracker
sudo pip3 install -r requirements.txt
sudo systemctl daemon-reload
sudo systemctl enable expenseapp.service
4 changes: 4 additions & 0 deletions scripts/start_service.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash
set -e
sudo systemctl restart expenseapp.service
sudo systemctl status expenseapp.service --no-pager