forked from coollabsio/coolify
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
00d7086
commit 3c54e01
Showing
8 changed files
with
80 additions
and
152 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,11 +22,6 @@ You can ask for guidance anytime on our | |
- Run `spin up` - You can notice that errors will be thrown. Don't worry. | ||
- If you see weird permission errors, especially on Mac, run `sudo spin up` instead. | ||
|
||
If you are running Coolify for the first time: | ||
- Run `./scripts/run dev:init` - This will delete any existing database layouts, migrate database to the new layout, and seed your database. | ||
|
||
> If you see the login page with a 404 error, you forgot to run `./scripts/run dev:init`. | ||
### 4) Start development | ||
You can login your Coolify instance at `localhost:8000` with `[email protected]` and `password`. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?php | ||
|
||
namespace App\Console\Commands; | ||
|
||
use App\Models\InstanceSettings; | ||
use Illuminate\Console\Command; | ||
use Illuminate\Support\Facades\Artisan; | ||
use Illuminate\Support\Facades\Process; | ||
|
||
class Dev extends Command | ||
{ | ||
protected $signature = 'dev:init'; | ||
protected $description = 'Init the app in dev mode'; | ||
|
||
public function handle() | ||
{ | ||
// Generate APP_KEY if not exists | ||
if (empty(env('APP_KEY'))) { | ||
echo "Generating APP_KEY.\n"; | ||
Artisan::call('key:generate'); | ||
} | ||
// Seed database if it's empty | ||
$settings = InstanceSettings::find(0); | ||
if (!$settings) { | ||
echo "Initializing instance, seeding database.\n"; | ||
Artisan::call('migrate --seed'); | ||
} else { | ||
echo "Instance already initialized.\n"; | ||
} | ||
// Set permissions | ||
Process::run(['chmod', '-R', 'o+rwx', '.']); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
#!/command/execlineb -P | ||
foreground { composer -d /var/www/html/ install } | ||
foreground { php /var/www/html/artisan key:generate } | ||
foreground { php /var/www/html/artisan migrate --step } | ||
foreground { php /var/www/html/artisan dev:init } | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters