Skip to content

Commit

Permalink
replace bash with httpd, so that docker graceful kill propagates
Browse files Browse the repository at this point in the history
  • Loading branch information
Greg Martyn committed May 10, 2016
1 parent 57c8f14 commit b4c6637
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions bin/setup.sh
@@ -1,4 +1,6 @@
#!/usr/bin/env bash
set -x #echo on

echo "-----------------------"
echo "START setup.sh"
echo "-----------------------"
Expand All @@ -24,14 +26,11 @@ mkdir ${LARAVEL_BOOTSTRAP_CACHE_PATH}/cache
chown -R www-data ${LARAVEL_BOOTSTRAP_CACHE_PATH}
chmod -R 775 ${LARAVEL_BOOTSTRAP_CACHE_PATH}

# cache the github host key in case we have to connect with ssh
touch ~/.ssh/known_hosts
ssh-keyscan -H github.com | sort -u - ~/.ssh/known_hosts > ~/.ssh/tmp_hosts
mv ~/.ssh/tmp_hosts ~/.ssh/known_hosts

# for some reason, when deploying to beanstalk the ~/.ssh/id_rsa file gets go+w access
# reset that. It doesn't happen when running docker-compose up locally; only on beanstalk.
chmod 600 ~/.ssh/id_rsa

# configure composer
if [ "$GITHUB_TOKEN" != "Your_Github_Token" ]; then
composer config --global github-oauth.github.com $GITHUB_TOKEN
Expand Down
2 changes: 1 addition & 1 deletion bin/start.sh
Expand Up @@ -20,4 +20,4 @@ php artisan migrate
# start processes
echo "Starting Apache"
source /etc/apache2/envvars
/usr/sbin/apache2 -DFOREGROUND
exec /usr/sbin/apache2 -DFOREGROUND

0 comments on commit b4c6637

Please sign in to comment.