@@ -53,32 +53,34 @@ CONFIG_DIR="$SCRIPT_DIR"/config
53
53
# ##################
54
54
55
55
pushd " $ASSETS_DIR " /api
56
- heroku create ${API_HOST} --buildpack https://github.com/heroku/heroku-buildpack-ruby.git#v200
57
- heroku addons:create heroku-postgresql:hobby-dev -a ${API_HOST}
58
- heroku addons:create heroku-redis:hobby-dev -a ${API_HOST}
59
- heroku config:set WEBSOCKET_PORT=4443 CLIENT_ORIGIN=https://${WEB_HOST} .herokuapp.com SESSION_TIME=${SESSION_TIME} -a ${API_HOST}
56
+ heroku create ${API_HOST} --buildpack https://github.com/heroku/heroku-buildpack-ruby.git#v200
57
+ heroku addons:create heroku-postgresql:hobby-dev -a ${API_HOST}
58
+ heroku addons:create heroku-redis:hobby-dev -a ${API_HOST}
59
+ heroku config:set WEBSOCKET_PORT=4443 CLIENT_ORIGIN=https://${WEB_HOST} .herokuapp.com SESSION_TIME=${SESSION_TIME} -a ${API_HOST}
60
60
61
- rm -rf .git # blow away any existent git directory from a previous run
62
- git init .
63
- git add .
64
- git commit -m " Packaging for initial Heroku deployment"
65
- git push --set-upstream https://git.heroku.com/${API_HOST} .git master
66
- heroku run rake admin:create_user
[email protected] ADMIN_PASSWORD=password -a
${API_HOST}
61
+ rm -rf .git # blow away any existent git directory from a previous run
62
+ git init .
63
+ git add .
64
+ git commit -m " Packaging for initial Heroku deployment"
65
+ git push --set-upstream https://git.heroku.com/${API_HOST} .git master
66
+ heroku run rake admin:create_user
[email protected] ADMIN_PASSWORD=password -a
${API_HOST}
67
67
popd
68
68
69
69
# ##########################
70
70
# Deploy the web frontend
71
71
# ##########################
72
72
73
- cp " $CONFIG_DIR " /config.js " $ASSETS_DIR " /web/public_html
74
73
pushd " $ASSETS_DIR " /web
75
- sed -i ' ' " s/{{api-app-name}}/${API_HOST} /" public_html/config.js
74
+ sed \
75
+ -e " s/{{api-app-name}}/${API_HOST} /" \
76
+ < " $CONFIG_DIR " /config.js \
77
+ > " $ASSETS_DIR " /web/public_html/config.js
76
78
77
- heroku create ${WEB_HOST} --buildpack https://github.com/heroku/heroku-buildpack-static
79
+ heroku create ${WEB_HOST} --buildpack https://github.com/heroku/heroku-buildpack-static
78
80
79
- rm -rf .git # blow away any existent git directory from a previous run
80
- git init .
81
- git add .
82
- git commit -m " Packaging for initial Heroku deployment"
83
- git push --set-upstream https://git.heroku.com/${WEB_HOST} .git master
81
+ rm -rf .git # blow away any existent git directory from a previous run
82
+ git init .
83
+ git add .
84
+ git commit -m " Packaging for initial Heroku deployment"
85
+ git push --set-upstream https://git.heroku.com/${WEB_HOST} .git master
84
86
popd
0 commit comments