Skip to content

Commit

Permalink
Merge pull request #238 from m1x0n/deploy-example-2
Browse files Browse the repository at this point in the history
Update deployment example due to important codebase changes.
  • Loading branch information
m1x0n committed Nov 12, 2015
2 parents dd53d0f + ba463ea commit 74997f2
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions deploy.example.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#!/bin/bash

# Bounce pm2 :)
pm2 reload all

# Clone repo
git clone -b master --single-branch https://github.com/m1x0n/asciit.git

Expand Down Expand Up @@ -34,8 +37,16 @@ SERVER_PREFIX=asciit
JWT_SECRET=superpupersecret
AUTH_REDIRECT=/auth
AUTH_ME=/auth/api/me
AUTH_ME=/profile/user/getByCentralId
AUTH_LOGOUT=/auth/logout
NOTIFICATIONS=/app/api/notification
JS_PATH=asciit/js/min
JS_IS_MIN=true
USE_COMMON_HEADER=true
LINK_PREVIEW_SCREENSHOT=phantomjs /path/to/rasterize/rasterize.js %url %file 1024px*1024px
SERVER_HOST=http://example.com
EOL

Expand All @@ -54,7 +65,6 @@ chmod -R 777 /home/code/asciit/storage
chmod -R 777 /home/code/asciit/bootstrap/cache

# Serve websockets
# Kill process on port 9092 if it exists
KILLABLE=`lsof -i tcp:9092 | tail -n 1 | awk '{print $2}'`

if [ -n "$KILLABLE" ]; then
Expand All @@ -63,6 +73,14 @@ else
echo "PORT 9092 is already free"
fi

KILLABLEZ=`lsof -i tcp:9091 | tail -n 1 | awk '{print $2}'`

if [ -n "$KILLABLEZ" ]; then
kill -9 $KILLABLEZ
else
echo "PORT 9091 is already free"
fi

# Serve sockets
cd /home/code/asciit
php artisan sockets:serve &
Expand Down

0 comments on commit 74997f2

Please sign in to comment.