Skip to content

Commit

Permalink
Merge pull request #11 from hayzey/task/deploy_scripts
Browse files Browse the repository at this point in the history
Setting up deploy scripts
  • Loading branch information
hayzey authored Oct 5, 2020
2 parents be783ee + 72137c3 commit b456c25
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 0 deletions.
12 changes: 12 additions & 0 deletions appspec.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: 0.0
os: linux
files:
- source: /
destination: /var/www/html/
hooks:
ApplicationStart:
- location: scripts/start_server.sh
timeout: 300
ApplicationStop:
- location: scripts/stop_server.sh
timeout: 300
14 changes: 14 additions & 0 deletions buildspec.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
version: 0.2

phases:
install:
commands:
- yarn install
build:
commands:
- yarn test --watchAll=false
- yarn build
artifacts:
files:
- '**/*'
base-directory: build
2 changes: 2 additions & 0 deletions scripts/start_server.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
service httpd start
5 changes: 5 additions & 0 deletions scripts/stop_server.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash
isExistApp = `pgrep httpd`
if [[ -n $isExistApp ]]; then
service httpd stop
fi

0 comments on commit b456c25

Please sign in to comment.