-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #23 from fly-apps/minor-enhancements
Minor Enhancements
- Loading branch information
Showing
5 changed files
with
141 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 |
---|---|---|
@@ -1,40 +1,16 @@ | ||
<a href="https://supportukrainenow.org/"><img src="https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner-direct.svg" width="100%"></a> | ||
# Fly-Laravel | ||
|
||
------ | ||
Fly-Laravel was created by Fly.io and is a quick way to get a Laravel app running on Fly.io. It was built using [Laravel Zero](https://laravel-zero.com). | ||
|
||
<p align="center"> | ||
<img title="Laravel Zero" height="100" src="https://raw.githubusercontent.com/laravel-zero/docs/master/images/logo/laravel-zero-readme.png" /> | ||
</p> | ||
## Usage | ||
|
||
<p align="center"> | ||
<a href="https://github.com/laravel-zero/framework/actions"><img src="https://github.com/laravel-zero/laravel-zero/actions/workflows/tests.yml/badge.svg" alt="Build Status"></img></a> | ||
<a href="https://packagist.org/packages/laravel-zero/framework"><img src="https://img.shields.io/packagist/dt/laravel-zero/framework.svg" alt="Total Downloads"></a> | ||
<a href="https://packagist.org/packages/laravel-zero/framework"><img src="https://img.shields.io/packagist/v/laravel-zero/framework.svg?label=stable" alt="Latest Stable Version"></a> | ||
<a href="https://packagist.org/packages/laravel-zero/framework"><img src="https://img.shields.io/packagist/l/laravel-zero/framework.svg" alt="License"></a> | ||
</p> | ||
Fly-Laravel assumes that you have flyctl installed, and that you have it connected to your [Fly.io](https://www.fly.io) account. If you need help with this, check out https://fly.io/docs/speedrun/. | ||
|
||
<h4> <center>This is a <bold>community project</bold> and not an official Laravel one </center></h4> | ||
To get an app running on Fly.io, run `./vendor/bin/fly-laravel launch`. This will create (among other things) a `fly.toml` file which holds the entire app configuration. For more info about fly.toml app configuration, check out [the docs](https://fly.io/docs/reference/configuration/). | ||
|
||
Laravel Zero was created by [Nuno Maduro](https://github.com/nunomaduro) and [Owen Voke](https://github.com/owenvoke), and is a micro-framework that provides an elegant starting point for your console application. It is an **unofficial** and customized version of Laravel optimized for building command-line applications. | ||
|
||
- Built on top of the [Laravel](https://laravel.com) components. | ||
- Optional installation of Laravel [Eloquent](https://laravel-zero.com/docs/database/), Laravel [Logging](https://laravel-zero.com/docs/logging/) and many others. | ||
- Supports interactive [menus](https://laravel-zero.com/docs/build-interactive-menus/) and [desktop notifications](https://laravel-zero.com/docs/send-desktop-notifications/) on Linux, Windows & MacOS. | ||
- Ships with a [Scheduler](https://laravel-zero.com/docs/task-scheduling/) and a [Standalone Compiler](https://laravel-zero.com/docs/build-a-standalone-application/). | ||
- Integration with [Collision](https://github.com/nunomaduro/collision) - Beautiful error reporting | ||
|
||
------ | ||
|
||
## Documentation | ||
|
||
For full documentation, visit [laravel-zero.com](https://laravel-zero.com/). | ||
|
||
## Support the development | ||
**Do you like this project? Support it by donating** | ||
|
||
- PayPal: [Donate](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=66BYDWAT92N6L) | ||
- Patreon: [Donate](https://www.patreon.com/nunomaduro) | ||
For ease of use, you could configure a shell alias, like this: `alias fly-laravel='php vendor/bin/fly-laravel'`. | ||
To make this available everywhere, you can add this to your shell configuration file in your home directory, like `~/.zshrc` or `~/.bashrc`. Don't forget to restart your shell after. | ||
|
||
## License | ||
|
||
Laravel Zero is an open-source software licensed under the MIT license. | ||
Fly-Laravel is an open-source software licensed under the MIT license. |
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,64 @@ | ||
<?php | ||
|
||
namespace App\Commands; | ||
|
||
use Illuminate\Console\Scheduling\Schedule; | ||
use Illuminate\Process\Exceptions\ProcessFailedException; | ||
use Illuminate\Support\Facades\Process; | ||
use LaravelZero\Framework\Commands\Command; | ||
|
||
class DeployCommand extends Command | ||
{ | ||
/** | ||
* The signature of the command. | ||
* | ||
* @var string | ||
*/ | ||
protected $signature = 'deploy {--open}'; | ||
|
||
/** | ||
* The description of the command. | ||
* | ||
* @var string | ||
*/ | ||
protected $description = 'Deploy an app on Fly.io. Add the --open flag to open the app after deploying.'; | ||
|
||
/** | ||
* Execute the console command. | ||
* | ||
* @return mixed | ||
*/ | ||
public function handle() | ||
{ | ||
try | ||
{ | ||
$result = Process::run("fly deploy")->throw(); | ||
$this->line($result->output()); | ||
|
||
//if --open is added, run 'fly open' before quitting. | ||
if ($this->option('open')) | ||
{ | ||
$this->info("TODO: open the fly.io app. "); | ||
} | ||
} | ||
catch (ProcessFailedException $e) | ||
{ | ||
$this->error($e->result->errorOutput()); | ||
return Command::FAILURE; | ||
} | ||
|
||
//finalize | ||
return Command::SUCCESS; | ||
} | ||
|
||
/** | ||
* Define the command's schedule. | ||
* | ||
* @param \Illuminate\Console\Scheduling\Schedule $schedule | ||
* @return void | ||
*/ | ||
public function schedule(Schedule $schedule): void | ||
{ | ||
// $schedule->command(static::class)->everyMinute(); | ||
} | ||
} |
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