Added DB seeding support

added db seeding support configuration on install site command
by default is disabled to avoid overwriten existent db

Change-Id: Iba74a5f6f8a08f73d73bc0ca2d499ea215cf8c8a
This commit is contained in:
Sebastian Marcet 2016-03-21 20:41:20 -03:00
parent e7239d4746
commit 79e17cabef
3 changed files with 7 additions and 3 deletions

View File

@ -68,7 +68,9 @@ function site_init {
# populate application database
cd $target_dir
php artisan migrate --env=$LARAVEL_ENV
php artisan db:seed --env=$LARAVEL_ENV
if [[ $USE_DB_SEEDING -eq 1 ]]; then
php artisan db:seed --env=$LARAVEL_ENV
fi
update_node
install_bower
# activate site

View File

@ -60,6 +60,7 @@ class openstackid (
$email_smtp_server_port = 587,
$email_smtp_server_user = '',
$email_smtp_server_password = '',
$use_db_seeding = false,
) {
# php packages needed for openid server

View File

@ -1,5 +1,6 @@
SITE_ROOT=/srv/openstackid
SOURCE_TARBALL=http://tarballs.openstack.org/openstackid/openstackid-<%= @openstackid_release %>.tar.gz
LARAVEL_ENV=dev
LARAVEL_ENV=<%= @id_environment %>
RELEASE_NAME=openstackid-<%= @openstackid_release %>.tar.gz
SOURCE_ROOT=http://tarballs.openstack.org/openstackid/
SOURCE_ROOT=http://tarballs.openstack.org/openstackid/
USE_DB_SEEDING=<%= @use_db_seeding?1:0 %>