Skip to content

Commit

Permalink
fixing #99
Browse files Browse the repository at this point in the history
  • Loading branch information
Surey committed Nov 13, 2021
1 parent 7f65b6c commit 2d5cc51
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.MD
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,12 @@ All notable changes to this project will be documented in this file.
- #104: setup.sh is now checking for a running docker daemon and exists if not found
- #101: adding _netdev to fstab to prevent loss of storage mount on reboots
- #103: fixing the SNS topic encryption to allow SES notification sendout
- #99: improved the command within the greenlight task. basically extended the default /bin/start instead of the old quick and dirty hack.

### Changed
- renamed the root stack yaml file
- scalelite version push to 1.3
- Aurora Default Engine version pushed to 10.14
## [3.0.3] - 2021-05-27

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion bbb-on-aws-param.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"BBBTurnMinInstances": 1,
"BBBTurnDesiredInstances": 1,
"BBBDBName": "frontendapp",
"BBBDBEngineVersion": "10.12",
"BBBDBEngineVersion": "10.14",
"BBBEnvironmentStage": "dev",
"BBBEnvironmentName": "bbbonaws",
"BBBEnvironmentType": "scalable",
Expand Down
25 changes: 24 additions & 1 deletion templates/bbb-on-aws-frontendapps.template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,30 @@ Resources:
Command:
- /bin/sh
- -c
- /usr/local/bin/bundle exec rake db:migrate; /usr/local/bin/bundle exec rake user:create["bbbadmin","${ADMIN_LOGIN}","${ADMIN_PASSWORD}","admin"]; bin/start
- |
if [ "$RAILS_ENV" = "production" ] && [ "$DB_ADAPTER" = "postgresql" ]; then
while ! curl http://$DB_HOST:${DB_PORT:-5432}/ 2>&1 | grep '52'
do
echo "Waiting for postgres to start up ..."
sleep 1
done
fi
db_create="$(RAILS_ENV=$RAILS_ENV bundle exec rake db:create 2>&1)"
echo $db_create
if [[ $db_create == *"already exists"* ]]; then
echo ">>> Database migration"
bundle exec rake db:migrate
else
echo ">>> Database initialization"
bundle exec rake db:schema:load
bundle exec rake user:create["bbbadmin","${ADMIN_LOGIN}","${ADMIN_PASSWORD}","admin"]
fi
bundle exec rake assets:precompile
exec bundle exec puma -C config/puma.rb
Secrets:
- Name: ADMIN_PASSWORD
ValueFrom: !Sub "${BBBAdministratorlogin}:password::"
Expand Down

0 comments on commit 2d5cc51

Please sign in to comment.