Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix setup process #2688

Merged
merged 1 commit into from
May 16, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix: fix setup process
  • Loading branch information
asbiin committed May 16, 2019
commit 4e9d97bab50bdad2ed586d3c51403eddb1905afb
8 changes: 6 additions & 2 deletions app.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,17 @@
}
],
"scripts": {
"postdeploy": "php artisan monica:update --force -vvv"
"postdeploy": "php artisan setup:production --force -vvv"
},
"env": {
"APP_KEY": {
"description": "Please change this to a 32-character string - For example run `pwgen -s 32 1` and copy/paste the value.",
"description": "Please change this to a 32-character string. For example run `pwgen -s 32 1` and copy/paste the value.",
"value": "change-me-to-a-random-string----"
},
"APP_ENV": {
"description": "Use monica in 'production' mode, or set it to 'local' if you want to install Monica as a development version.",
"value": "production"
},
"APP_DISABLE_SIGNUP": {
"description": "Disable user signup.",
"value": "false"
Expand Down
4 changes: 3 additions & 1 deletion app/Console/Commands/Deactivate2FA.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ class Deactivate2FA extends Command
*
* @var string
*/
protected $signature = '2fa:deactivate {--email= : The email of the user to deactivate 2FA} {--force : run without asking for confirmation}';
protected $signature = '2fa:deactivate
{--force : Force the operation to run when in production.}
{--email= : The email of the user to deactivate 2FA.}';

/**
* The console command description.
Expand Down
3 changes: 2 additions & 1 deletion app/Console/Commands/MigrateDatabaseCollation.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ class MigrateDatabaseCollation extends Command
*
* @var string
*/
protected $signature = 'migrate:collation {--force : Force the operation to run when in production.}';
protected $signature = 'migrate:collation
{--force : Force the operation to run when in production.}';

/**
* The console command description.
Expand Down
3 changes: 2 additions & 1 deletion app/Console/Commands/PingVersionServer.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ class PingVersionServer extends Command
*
* @var string
*/
protected $signature = 'monica:ping {--force}';
protected $signature = 'monica:ping
{--force : Force the operation to run when in production.}';

/**
* The console command description.
Expand Down
8 changes: 4 additions & 4 deletions app/Console/Commands/SentryRelease.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ class SentryRelease extends Command
* @var string
*/
protected $signature = 'sentry:release
{--release= : release version for sentry}
{--store-release : store release version in .sentry-release file}
{--commit= : commit associated with this release}
{--environment= : sentry environment}';
{--release= : release version for sentry.}
{--store-release : store release version in .sentry-release file.}
{--commit= : commit associated with this release.}
{--environment= : sentry environment.}';

/**
* The console command description.
Expand Down
6 changes: 3 additions & 3 deletions app/Console/Commands/SetUserAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ class SetUserAdmin extends Command
*
* @var string
*/
protected $signature = 'monica:admin'.
' {--email= : The email of the user whose admin status you want to change}'.
' {--force : Run without asking for confirmation}';
protected $signature = 'monica:admin
{--force : Force the operation to run when in production.}
{--email= : The email of the user whose admin status you want to change}';

/**
* The console command description.
Expand Down
15 changes: 11 additions & 4 deletions app/Console/Commands/SetupProduction.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@ class SetupProduction extends Command
*
* @var string
*/
protected $signature = 'setup:production {--force}
{--email= : Login email for the first account}
{--password= : Password to set for the first account}';
protected $signature = 'setup:production
{--force : Force the operation to run when in production.}
{--email= : Login email for the first account.}
{--password= : Password to set for the first account.}
{--skipSeed : Skip the populate database process.}';

/**
* The console command description.
Expand Down Expand Up @@ -43,7 +45,12 @@ public function handle()
touch(__DIR__.'/../../../.env');
}

$this->callSilent('monica:update', ['--force' => true]);
$this->call('monica:update', ['--force' => true]);

if (! $this->option('skipSeed')) {
$this->line('✓ Filling database');
$this->call('db:seed', ['--force' => true]);
}

$this->line('');
$this->line('-----------------------------');
Expand Down
2 changes: 1 addition & 1 deletion app/Console/Commands/SetupTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class SetupTest extends Command
* @var string
*/
protected $signature = 'setup:test
{--skipSeed : Whether we should populate the database with fake data}';
{--skipSeed : Skip the populate database with fake data.}';

/**
* The console command description.
Expand Down
5 changes: 4 additions & 1 deletion app/Console/Commands/Update.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ class Update extends Command
*
* @var string
*/
protected $signature = 'monica:update {--force} {--composer-install} {--dev}';
protected $signature = 'monica:update
{--force : Force the operation to run when in production.}
{--composer-install : Updating composer dependencies.}
{--dev : Install dev dependencies too.}';

/**
* The console command description.
Expand Down