mirror of
https://github.com/vitodeploy/vito.git
synced 2025-04-19 01:41:36 +00:00
cleanup
fix installation fix docker
This commit is contained in:
parent
d3aaf2a6fa
commit
d4f1a2d4da
@ -2,7 +2,7 @@ APP_NAME=Vito
|
||||
APP_ENV=local
|
||||
APP_KEY=
|
||||
APP_DEBUG=true
|
||||
APP_URL=http://vito.test
|
||||
APP_URL=
|
||||
|
||||
FILESYSTEM_DRIVER=local
|
||||
|
||||
|
@ -1,7 +1,8 @@
|
||||
APP_NAME=Vito
|
||||
APP_ENV=production
|
||||
APP_KEY=
|
||||
APP_URL=http://vito.test
|
||||
APP_DEBUG=false
|
||||
APP_URL=
|
||||
|
||||
FILESYSTEM_DRIVER=local
|
||||
|
||||
|
32
.env.sail
32
.env.sail
@ -2,28 +2,10 @@ APP_NAME=Vito
|
||||
APP_ENV=local
|
||||
APP_KEY=
|
||||
APP_DEBUG=true
|
||||
APP_URL=http://vito.test
|
||||
APP_URL=
|
||||
APP_PORT=8000
|
||||
|
||||
LOG_CHANNEL=stack
|
||||
LOG_LEVEL=debug
|
||||
|
||||
DB_CONNECTION=mysql
|
||||
DB_HOST=mysql
|
||||
DB_PORT=3306
|
||||
DB_DATABASE=vito
|
||||
DB_USERNAME=sail
|
||||
DB_PASSWORD=password
|
||||
|
||||
BROADCAST_DRIVER=null
|
||||
CACHE_DRIVER=redis
|
||||
FILESYSTEM_DRIVER=local
|
||||
QUEUE_CONNECTION=default
|
||||
SESSION_DRIVER=database
|
||||
SESSION_LIFETIME=120
|
||||
|
||||
REDIS_HOST=redis
|
||||
REDIS_PASSWORD=null
|
||||
REDIS_PORT=6379
|
||||
|
||||
MAIL_MAILER=smtp
|
||||
MAIL_HOST=
|
||||
@ -33,13 +15,3 @@ MAIL_PASSWORD=null
|
||||
MAIL_ENCRYPTION=null
|
||||
MAIL_FROM_ADDRESS=null
|
||||
MAIL_FROM_NAME="${APP_NAME}"
|
||||
|
||||
SSH_PUBLIC_KEY_NAME=ssh-public.key
|
||||
SSH_PRIVATE_KEY_NAME=ssh-private.pem
|
||||
|
||||
APP_SERVICE=vito
|
||||
|
||||
FORWARD_REDIS_PORT=2060
|
||||
FORWARD_DB_PORT=2070
|
||||
APP_PORT=2080
|
||||
HMR_PORT=2090
|
||||
|
18
README.md
18
README.md
@ -11,6 +11,12 @@ ## About Vito
|
||||
|
||||
Vito is a self-hosted web application that helps you manage your servers and deploy your PHP applications into production servers without a hassle.
|
||||
|
||||
## Quick Start
|
||||
|
||||
```sh
|
||||
bash <(curl -Ls https://raw.githubusercontent.com/vitodeploy/vito/1.x/scripts/install.sh)
|
||||
```
|
||||
|
||||
## Features
|
||||
|
||||
- Provisions and Manages the server
|
||||
@ -38,13 +44,13 @@ ## Useful Links
|
||||
## Credits
|
||||
|
||||
- Laravel
|
||||
- PHPSecLib
|
||||
- PHPUnit
|
||||
- Tailwindcss
|
||||
- Alpinejs
|
||||
- HTMX
|
||||
- Vite
|
||||
- Log Viewer by Arunas Skirius
|
||||
- PHPSecLib
|
||||
- Laravel Blade Icons
|
||||
- Guzzlehttp
|
||||
- Owenvoke for `owenvoke/blade-fontawesome`
|
||||
- Axios
|
||||
- Toastr by CodeSeven
|
||||
- Prettier
|
||||
- Postcss
|
||||
- Flowbite
|
||||
|
@ -4,7 +4,8 @@ ## Supported Versions
|
||||
|
||||
| Version | Supported |
|
||||
| ------- | ------------------ |
|
||||
| 0.x | :white_check_mark: |
|
||||
| 0.x | :white_cross_mark: |
|
||||
| 1.x | :white_check_mark: |
|
||||
|
||||
## Reporting a Vulnerability
|
||||
|
||||
|
@ -1,37 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Providers;
|
||||
|
||||
use Illuminate\Auth\Events\Registered;
|
||||
use Illuminate\Auth\Listeners\SendEmailVerificationNotification;
|
||||
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
|
||||
|
||||
class EventServiceProvider extends ServiceProvider
|
||||
{
|
||||
/**
|
||||
* The event to listener mappings for the application.
|
||||
*
|
||||
* @var array<class-string, array<int, class-string>>
|
||||
*/
|
||||
protected $listen = [
|
||||
Registered::class => [
|
||||
SendEmailVerificationNotification::class,
|
||||
],
|
||||
];
|
||||
|
||||
/**
|
||||
* Register any events for your application.
|
||||
*/
|
||||
public function boot(): void
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if events and listeners should be automatically discovered.
|
||||
*/
|
||||
public function shouldDiscoverEvents(): bool
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
64
app/Providers/TelescopeServiceProvider.php
Normal file
64
app/Providers/TelescopeServiceProvider.php
Normal file
@ -0,0 +1,64 @@
|
||||
<?php
|
||||
|
||||
namespace App\Providers;
|
||||
|
||||
use Illuminate\Support\Facades\Gate;
|
||||
use Laravel\Telescope\IncomingEntry;
|
||||
use Laravel\Telescope\Telescope;
|
||||
use Laravel\Telescope\TelescopeApplicationServiceProvider;
|
||||
|
||||
class TelescopeServiceProvider extends TelescopeApplicationServiceProvider
|
||||
{
|
||||
/**
|
||||
* Register any application services.
|
||||
*/
|
||||
public function register(): void
|
||||
{
|
||||
// Telescope::night();
|
||||
|
||||
$this->hideSensitiveRequestDetails();
|
||||
|
||||
$isLocal = $this->app->environment('local');
|
||||
|
||||
Telescope::filter(function (IncomingEntry $entry) use ($isLocal) {
|
||||
return $isLocal ||
|
||||
$entry->isReportableException() ||
|
||||
$entry->isFailedRequest() ||
|
||||
$entry->isFailedJob() ||
|
||||
$entry->isScheduledTask() ||
|
||||
$entry->hasMonitoredTag();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Prevent sensitive request details from being logged by Telescope.
|
||||
*/
|
||||
protected function hideSensitiveRequestDetails(): void
|
||||
{
|
||||
if ($this->app->environment('local')) {
|
||||
return;
|
||||
}
|
||||
|
||||
Telescope::hideRequestParameters(['_token']);
|
||||
|
||||
Telescope::hideRequestHeaders([
|
||||
'cookie',
|
||||
'x-csrf-token',
|
||||
'x-xsrf-token',
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Register the Telescope gate.
|
||||
*
|
||||
* This gate determines who can access Telescope in non-local environments.
|
||||
*/
|
||||
protected function gate(): void
|
||||
{
|
||||
Gate::define('viewTelescope', function ($user) {
|
||||
return in_array($user->email, [
|
||||
//
|
||||
]);
|
||||
});
|
||||
}
|
||||
}
|
@ -11,11 +11,9 @@
|
||||
"php": "^8.2",
|
||||
"ext-ftp": "*",
|
||||
"aws/aws-sdk-php": "^3.158",
|
||||
"guzzlehttp/guzzle": "^7.2",
|
||||
"laravel/fortify": "^1.17",
|
||||
"laravel/framework": "^10.0",
|
||||
"laravel/tinker": "^2.8",
|
||||
"opcodesio/log-viewer": "^3.0",
|
||||
"phpseclib/phpseclib": "~3.0"
|
||||
},
|
||||
"require-dev": {
|
||||
|
143
composer.lock
generated
143
composer.lock
generated
@ -4,7 +4,7 @@
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "322884779fcb49239f685d3c86a2ded2",
|
||||
"content-hash": "e2a93e3df13daae2cf880eb44ed6f478",
|
||||
"packages": [
|
||||
{
|
||||
"name": "aws/aws-crt-php",
|
||||
@ -2711,147 +2711,6 @@
|
||||
],
|
||||
"time": "2023-02-08T01:06:31+00:00"
|
||||
},
|
||||
{
|
||||
"name": "opcodesio/log-viewer",
|
||||
"version": "v3.5.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/opcodesio/log-viewer.git",
|
||||
"reference": "65d945fc36ab12a2a7588539bac3c367c6b41e16"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/opcodesio/log-viewer/zipball/65d945fc36ab12a2a7588539bac3c367c6b41e16",
|
||||
"reference": "65d945fc36ab12a2a7588539bac3c367c6b41e16",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"illuminate/contracts": "^8.0|^9.0|^10.0|^11.0",
|
||||
"opcodesio/mail-parser": "^0.1.6",
|
||||
"php": "^8.0"
|
||||
},
|
||||
"conflict": {
|
||||
"arcanedev/log-viewer": "^8.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"guzzlehttp/guzzle": "^7.2",
|
||||
"itsgoingd/clockwork": "^5.1",
|
||||
"laravel/pint": "^1.0",
|
||||
"nunomaduro/collision": "^7.0|^8.0",
|
||||
"orchestra/testbench": "^7.6|^8.0|^9.0",
|
||||
"pestphp/pest": "^2.0",
|
||||
"pestphp/pest-plugin-laravel": "^2.0",
|
||||
"spatie/test-time": "^1.3"
|
||||
},
|
||||
"suggest": {
|
||||
"guzzlehttp/guzzle": "Required for multi-host support. ^7.2"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"laravel": {
|
||||
"providers": [
|
||||
"Opcodes\\LogViewer\\LogViewerServiceProvider"
|
||||
],
|
||||
"aliases": {
|
||||
"LogViewer": "Opcodes\\LogViewer\\Facades\\LogViewer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Opcodes\\LogViewer\\": "src"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Arunas Skirius",
|
||||
"email": "arukomp@gmail.com",
|
||||
"role": "Developer"
|
||||
}
|
||||
],
|
||||
"description": "Fast and easy-to-use log viewer for your Laravel application",
|
||||
"homepage": "https://github.com/opcodesio/log-viewer",
|
||||
"keywords": [
|
||||
"arukompas",
|
||||
"better-log-viewer",
|
||||
"laravel",
|
||||
"log viewer",
|
||||
"logs",
|
||||
"opcodesio"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/opcodesio/log-viewer/issues",
|
||||
"source": "https://github.com/opcodesio/log-viewer/tree/v3.5.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://www.buymeacoffee.com/arunas",
|
||||
"type": "custom"
|
||||
},
|
||||
{
|
||||
"url": "https://github.com/arukompas",
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2024-03-01T18:01:18+00:00"
|
||||
},
|
||||
{
|
||||
"name": "opcodesio/mail-parser",
|
||||
"version": "v0.1.6",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/opcodesio/mail-parser.git",
|
||||
"reference": "639ef31cbd146a63416283e75afce152e13233ea"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/opcodesio/mail-parser/zipball/639ef31cbd146a63416283e75afce152e13233ea",
|
||||
"reference": "639ef31cbd146a63416283e75afce152e13233ea",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^8.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"pestphp/pest": "^2.16",
|
||||
"symfony/var-dumper": "^6.3"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Opcodes\\MailParser\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Arunas Skirius",
|
||||
"email": "arukomp@gmail.com",
|
||||
"role": "Developer"
|
||||
}
|
||||
],
|
||||
"description": "Parse emails without the mailparse extension",
|
||||
"keywords": [
|
||||
"arukompas",
|
||||
"email",
|
||||
"email parser",
|
||||
"mail",
|
||||
"opcodesio",
|
||||
"php"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/opcodesio/mail-parser/issues",
|
||||
"source": "https://github.com/opcodesio/mail-parser/tree/v0.1.6"
|
||||
},
|
||||
"time": "2023-11-19T08:47:43+00:00"
|
||||
},
|
||||
{
|
||||
"name": "paragonie/constant_time_encoding",
|
||||
"version": "v2.6.3",
|
||||
|
@ -192,7 +192,6 @@
|
||||
*/
|
||||
App\Providers\AppServiceProvider::class,
|
||||
App\Providers\AuthServiceProvider::class,
|
||||
App\Providers\EventServiceProvider::class,
|
||||
App\Providers\RouteServiceProvider::class,
|
||||
],
|
||||
|
||||
|
@ -1,214 +0,0 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Log Viewer
|
||||
|--------------------------------------------------------------------------
|
||||
| Log Viewer can be disabled, so it's no longer accessible via browser.
|
||||
|
|
||||
*/
|
||||
|
||||
'enabled' => env('LOG_VIEWER_ENABLED', true),
|
||||
|
||||
'require_auth_in_production' => true,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Log Viewer Domain
|
||||
|--------------------------------------------------------------------------
|
||||
| You may change the domain where Log Viewer should be active.
|
||||
| If the domain is empty, all domains will be valid.
|
||||
|
|
||||
*/
|
||||
|
||||
'route_domain' => null,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Log Viewer Route
|
||||
|--------------------------------------------------------------------------
|
||||
| Log Viewer will be available under this URL.
|
||||
|
|
||||
*/
|
||||
|
||||
'route_path' => 'log-viewer',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Back to system URL
|
||||
|--------------------------------------------------------------------------
|
||||
| When set, displays a link to easily get back to this URL.
|
||||
| Set to `null` to hide this link.
|
||||
|
|
||||
| Optional label to display for the above URL.
|
||||
|
|
||||
*/
|
||||
|
||||
'back_to_system_url' => config('app.url', null),
|
||||
|
||||
'back_to_system_label' => null, // Displayed by default: "Back to {{ app.name }}"
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Log Viewer time zone.
|
||||
|--------------------------------------------------------------------------
|
||||
| The time zone in which to display the times in the UI. Defaults to
|
||||
| the application's timezone defined in config/app.php.
|
||||
|
|
||||
*/
|
||||
|
||||
'timezone' => null,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Log Viewer route middleware.
|
||||
|--------------------------------------------------------------------------
|
||||
| Optional middleware to use when loading the initial Log Viewer page.
|
||||
|
|
||||
*/
|
||||
|
||||
'middleware' => [
|
||||
'web',
|
||||
'auth',
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Log Viewer API middleware.
|
||||
|--------------------------------------------------------------------------
|
||||
| Optional middleware to use on every API request. The same API is also
|
||||
| used from within the Log Viewer user interface.
|
||||
|
|
||||
*/
|
||||
|
||||
'api_middleware' => [
|
||||
\Opcodes\LogViewer\Http\Middleware\EnsureFrontendRequestsAreStateful::class,
|
||||
\Opcodes\LogViewer\Http\Middleware\AuthorizeLogViewer::class,
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Log Viewer Remote hosts.
|
||||
|--------------------------------------------------------------------------
|
||||
| Log Viewer supports viewing Laravel logs from remote hosts. They must
|
||||
| be running Log Viewer as well. Below you can define the hosts you
|
||||
| would like to show in this Log Viewer instance.
|
||||
|
|
||||
*/
|
||||
|
||||
'hosts' => [
|
||||
'local' => [
|
||||
'name' => ucfirst(env('APP_ENV', 'local')),
|
||||
],
|
||||
|
||||
// 'staging' => [
|
||||
// 'name' => 'Staging',
|
||||
// 'host' => 'https://staging.example.com/log-viewer',
|
||||
// 'auth' => [ // Example of HTTP Basic auth
|
||||
// 'username' => 'username',
|
||||
// 'password' => 'password',
|
||||
// ],
|
||||
// ],
|
||||
//
|
||||
// 'production' => [
|
||||
// 'name' => 'Production',
|
||||
// 'host' => 'https://example.com/log-viewer',
|
||||
// 'auth' => [ // Example of Bearer token auth
|
||||
// 'token' => env('LOG_VIEWER_PRODUCTION_TOKEN'),
|
||||
// ],
|
||||
// 'headers' => [
|
||||
// 'X-Foo' => 'Bar',
|
||||
// ],
|
||||
// ],
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Include file patterns
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
*/
|
||||
|
||||
'include_files' => [
|
||||
'*.log',
|
||||
'**/*.log',
|
||||
|
||||
// You can include paths to other log types as well, such as apache, nginx, and more.
|
||||
'/var/log/httpd/*',
|
||||
'/var/log/nginx/*',
|
||||
|
||||
// MacOS Apple Silicon logs
|
||||
'/opt/homebrew/var/log/nginx/*',
|
||||
'/opt/homebrew/var/log/httpd/*',
|
||||
'/opt/homebrew/var/log/php-fpm.log',
|
||||
'/opt/homebrew/var/log/postgres*log',
|
||||
'/opt/homebrew/var/log/redis*log',
|
||||
'/opt/homebrew/var/log/supervisor*log',
|
||||
|
||||
// '/absolute/paths/supported',
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Exclude file patterns.
|
||||
|--------------------------------------------------------------------------
|
||||
| This will take precedence over included files.
|
||||
|
|
||||
*/
|
||||
|
||||
'exclude_files' => [
|
||||
// 'my_secret.log'
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Hide unknown files.
|
||||
|--------------------------------------------------------------------------
|
||||
| The include/exclude options above might catch files which are not
|
||||
| logs supported by Log Viewer. In that case, you can hide them
|
||||
| from the UI and API calls by setting this to true.
|
||||
|
|
||||
*/
|
||||
|
||||
'hide_unknown_files' => true,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Shorter stack trace filters.
|
||||
|--------------------------------------------------------------------------
|
||||
| Lines containing any of these strings will be excluded from the full log.
|
||||
| This setting is only active when the function is enabled via the user interface.
|
||||
|
|
||||
*/
|
||||
|
||||
'shorter_stack_trace_excludes' => [
|
||||
'/vendor/symfony/',
|
||||
'/vendor/laravel/framework/',
|
||||
'/vendor/barryvdh/laravel-debugbar/',
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Cache driver
|
||||
|--------------------------------------------------------------------------
|
||||
| Cache driver to use for storing the log indices. Indices are used to speed up
|
||||
| log navigation. Defaults to your application's default cache driver.
|
||||
|
|
||||
*/
|
||||
|
||||
'cache_driver' => env('LOG_VIEWER_CACHE_DRIVER', null),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Chunk size when scanning log files lazily
|
||||
|--------------------------------------------------------------------------
|
||||
| The size in MB of files to scan before updating the progress bar when searching across all files.
|
||||
|
|
||||
*/
|
||||
|
||||
'lazy_scan_chunk_size_in_mb' => 50,
|
||||
|
||||
'strip_extracted_context' => true,
|
||||
];
|
@ -0,0 +1,70 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Get the migration connection name.
|
||||
*/
|
||||
public function getConnection(): string|null
|
||||
{
|
||||
return config('telescope.storage.database.connection');
|
||||
}
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
$schema = Schema::connection($this->getConnection());
|
||||
|
||||
$schema->create('telescope_entries', function (Blueprint $table) {
|
||||
$table->bigIncrements('sequence');
|
||||
$table->uuid('uuid');
|
||||
$table->uuid('batch_id');
|
||||
$table->string('family_hash')->nullable();
|
||||
$table->boolean('should_display_on_index')->default(true);
|
||||
$table->string('type', 20);
|
||||
$table->longText('content');
|
||||
$table->dateTime('created_at')->nullable();
|
||||
|
||||
$table->unique('uuid');
|
||||
$table->index('batch_id');
|
||||
$table->index('family_hash');
|
||||
$table->index('created_at');
|
||||
$table->index(['type', 'should_display_on_index']);
|
||||
});
|
||||
|
||||
$schema->create('telescope_entries_tags', function (Blueprint $table) {
|
||||
$table->uuid('entry_uuid');
|
||||
$table->string('tag');
|
||||
|
||||
$table->primary(['entry_uuid', 'tag']);
|
||||
$table->index('tag');
|
||||
|
||||
$table->foreign('entry_uuid')
|
||||
->references('uuid')
|
||||
->on('telescope_entries')
|
||||
->onDelete('cascade');
|
||||
});
|
||||
|
||||
$schema->create('telescope_monitoring', function (Blueprint $table) {
|
||||
$table->string('tag')->primary();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
$schema = Schema::connection($this->getConnection());
|
||||
|
||||
$schema->dropIfExists('telescope_entries_tags');
|
||||
$schema->dropIfExists('telescope_entries');
|
||||
$schema->dropIfExists('telescope_monitoring');
|
||||
}
|
||||
};
|
@ -19,9 +19,9 @@ RUN apt update \
|
||||
python2 dnsutils librsvg2-bin fswatch wget \
|
||||
&& add-apt-repository ppa:ondrej/php -y \
|
||||
&& apt update \
|
||||
&& apt install -y php8.1 php8.1-fpm php8.1-mbstring php8.1-mcrypt php8.1-gd php8.1-xml \
|
||||
php8.1-curl php8.1-gettext php8.1-zip php8.1-bcmath php8.1-soap php8.1-redis
|
||||
COPY docker/standalone/php.ini /etc/php/8.1/cli/conf.d/99-vito.ini
|
||||
&& apt install -y php8.2 php8.2-fpm php8.2-mbstring php8.2-mcrypt php8.2-gd php8.2-xml \
|
||||
php8.2-curl php8.2-gettext php8.2-zip php8.2-bcmath php8.2-soap php8.2-redis php8.3-sqlite3
|
||||
COPY docker/php.ini /etc/php/8.2/cli/conf.d/99-vito.ini
|
||||
|
||||
# composer
|
||||
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
|
||||
@ -37,14 +37,14 @@ RUN chown -R www-data:www-data /var/www/html \
|
||||
# webserver
|
||||
RUN rm /etc/nginx/sites-available/default
|
||||
RUN rm /etc/nginx/sites-enabled/default
|
||||
COPY docker/standalone/nginx.conf /etc/nginx/sites-available/default
|
||||
COPY docker/nginx.conf /etc/nginx/sites-available/default
|
||||
RUN ln -s /etc/nginx/sites-available/default /etc/nginx/sites-enabled/default
|
||||
|
||||
# supervisord
|
||||
COPY docker/standalone/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
|
||||
COPY docker/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
|
||||
|
||||
# start
|
||||
COPY docker/standalone/start.sh /start.sh
|
||||
COPY docker/start.sh /start.sh
|
||||
RUN chmod +x /start.sh
|
||||
|
||||
EXPOSE 80
|
@ -6,20 +6,23 @@ NAME=${NAME:-"vito"}
|
||||
EMAIL=${EMAIL:-"vito@example.com"}
|
||||
PASSWORD=${PASSWORD:-"password"}
|
||||
|
||||
# Check if the flag file does not exist, indicating a first run
|
||||
# check if the flag file does not exist, indicating a first run
|
||||
if [ ! -f "$INIT_FLAG" ]; then
|
||||
echo "Initializing..."
|
||||
|
||||
# Generate SSH keys
|
||||
# generate SSH keys
|
||||
openssl genpkey -algorithm RSA -out /var/www/html/storage/ssh-private.pem
|
||||
chmod 600 /var/www/html/storage/ssh-private.pem
|
||||
ssh-keygen -y -f /var/www/html/storage/ssh-private.pem > /var/www/html/storage/ssh-public.key
|
||||
|
||||
# Create the flag file to indicate completion of initialization tasks
|
||||
# create sqlite database
|
||||
touch /var/www/html/storage/database.sqlite
|
||||
|
||||
# create the flag file to indicate completion of initialization tasks
|
||||
touch "$INIT_FLAG"
|
||||
fi
|
||||
|
||||
service php8.1-fpm start
|
||||
service php8.2-fpm start
|
||||
|
||||
service nginx start
|
||||
|
163
package-lock.json
generated
163
package-lock.json
generated
@ -17,7 +17,6 @@
|
||||
"prettier": "^3.2.5",
|
||||
"prettier-plugin-blade": "^2.1.6",
|
||||
"prettier-plugin-tailwindcss": "^0.5.11",
|
||||
"pusher-js": "^4.3.1",
|
||||
"tailwindcss": "^3.1.0",
|
||||
"tippy.js": "^6.3.7",
|
||||
"toastr": "^2.1.4",
|
||||
@ -864,18 +863,6 @@
|
||||
"reusify": "^1.0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/faye-websocket": {
|
||||
"version": "0.9.4",
|
||||
"resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.9.4.tgz",
|
||||
"integrity": "sha512-5i9HTcrJrCCcmztcjIHpt+eWwu89Ed66rNBf5LtTy69QHbP/mtvjOTGqiOR01QrSbfoT1EP0v4XXvydpJj0r9w==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"websocket-driver": ">=0.5.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/fill-range": {
|
||||
"version": "7.0.1",
|
||||
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
|
||||
@ -987,12 +974,6 @@
|
||||
"integrity": "sha512-UgchasltTCrTuU2DQLom3ohHrBvwr7OqpwyAVJ9VxtNBng4XKkVsqrv0Qr3srqvM9ZNI3f1MmvVQQqK7KW/bTA==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/http-parser-js": {
|
||||
"version": "0.5.8",
|
||||
"resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.5.8.tgz",
|
||||
"integrity": "sha512-SGeBX54F94Wgu5RH3X5jsDtf4eHyRogWX1XGT3b4HuW3tQPM4AaBzoUji/4AAJNXCEOWZ5O0DgZmJw1947gD5Q==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/inflight": {
|
||||
"version": "1.0.6",
|
||||
"resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
|
||||
@ -1537,18 +1518,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/pusher-js": {
|
||||
"version": "4.4.0",
|
||||
"resolved": "https://registry.npmjs.org/pusher-js/-/pusher-js-4.4.0.tgz",
|
||||
"integrity": "sha512-oxSEG764hqeGAqW9Ryq5KdGQrbM/2sBy5L6Jsh62GyRbRO4z0qI9EjQ6IfQSDhR59b/tY0ANuXD8+ZOZY9AOyg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"faye-websocket": "0.9.4",
|
||||
"tweetnacl": "^1.0.0",
|
||||
"tweetnacl-util": "^0.15.0",
|
||||
"xmlhttprequest": "^1.8.0"
|
||||
}
|
||||
},
|
||||
"node_modules/queue-microtask": {
|
||||
"version": "1.2.3",
|
||||
"resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz",
|
||||
@ -1668,26 +1637,6 @@
|
||||
"queue-microtask": "^1.2.2"
|
||||
}
|
||||
},
|
||||
"node_modules/safe-buffer": {
|
||||
"version": "5.2.1",
|
||||
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
|
||||
"integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/feross"
|
||||
},
|
||||
{
|
||||
"type": "patreon",
|
||||
"url": "https://www.patreon.com/feross"
|
||||
},
|
||||
{
|
||||
"type": "consulting",
|
||||
"url": "https://feross.org/support"
|
||||
}
|
||||
]
|
||||
},
|
||||
"node_modules/source-map-js": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz",
|
||||
@ -1830,18 +1779,6 @@
|
||||
"integrity": "sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/tweetnacl": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.3.tgz",
|
||||
"integrity": "sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/tweetnacl-util": {
|
||||
"version": "0.15.1",
|
||||
"resolved": "https://registry.npmjs.org/tweetnacl-util/-/tweetnacl-util-0.15.1.tgz",
|
||||
"integrity": "sha512-RKJBIj8lySrShN4w6i/BonWp2Z/uxwC3h4y7xsRrpP59ZboCd0GpEVsOnMDYLMmKBpYhb5TgHzZXy7wTfYFBRw==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/update-browserslist-db": {
|
||||
"version": "1.0.10",
|
||||
"resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.10.tgz",
|
||||
@ -1942,44 +1879,12 @@
|
||||
"vite": "^2 || ^3 || ^4"
|
||||
}
|
||||
},
|
||||
"node_modules/websocket-driver": {
|
||||
"version": "0.7.4",
|
||||
"resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.4.tgz",
|
||||
"integrity": "sha512-b17KeDIQVjvb0ssuSDF2cYXSg2iztliJ4B9WdsuB6J952qCPKmnVq4DyW5motImXHDC1cBT/1UezrJVsKw5zjg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"http-parser-js": ">=0.5.1",
|
||||
"safe-buffer": ">=5.1.0",
|
||||
"websocket-extensions": ">=0.1.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.8.0"
|
||||
}
|
||||
},
|
||||
"node_modules/websocket-extensions": {
|
||||
"version": "0.1.4",
|
||||
"resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.4.tgz",
|
||||
"integrity": "sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=0.8.0"
|
||||
}
|
||||
},
|
||||
"node_modules/wrappy": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
|
||||
"integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/xmlhttprequest": {
|
||||
"version": "1.8.0",
|
||||
"resolved": "https://registry.npmjs.org/xmlhttprequest/-/xmlhttprequest-1.8.0.tgz",
|
||||
"integrity": "sha512-58Im/U0mlVBLM38NdZjHyhuMtCqa61469k2YP/AaPbvCoV9aQGUpbJBj1QRm2ytRiVQBD/fsw7L2bJGDVQswBA==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=0.4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/yaml": {
|
||||
"version": "1.10.2",
|
||||
"resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz",
|
||||
@ -2510,15 +2415,6 @@
|
||||
"reusify": "^1.0.4"
|
||||
}
|
||||
},
|
||||
"faye-websocket": {
|
||||
"version": "0.9.4",
|
||||
"resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.9.4.tgz",
|
||||
"integrity": "sha512-5i9HTcrJrCCcmztcjIHpt+eWwu89Ed66rNBf5LtTy69QHbP/mtvjOTGqiOR01QrSbfoT1EP0v4XXvydpJj0r9w==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"websocket-driver": ">=0.5.1"
|
||||
}
|
||||
},
|
||||
"fill-range": {
|
||||
"version": "7.0.1",
|
||||
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
|
||||
@ -2601,12 +2497,6 @@
|
||||
"integrity": "sha512-UgchasltTCrTuU2DQLom3ohHrBvwr7OqpwyAVJ9VxtNBng4XKkVsqrv0Qr3srqvM9ZNI3f1MmvVQQqK7KW/bTA==",
|
||||
"dev": true
|
||||
},
|
||||
"http-parser-js": {
|
||||
"version": "0.5.8",
|
||||
"resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.5.8.tgz",
|
||||
"integrity": "sha512-SGeBX54F94Wgu5RH3X5jsDtf4eHyRogWX1XGT3b4HuW3tQPM4AaBzoUji/4AAJNXCEOWZ5O0DgZmJw1947gD5Q==",
|
||||
"dev": true
|
||||
},
|
||||
"inflight": {
|
||||
"version": "1.0.6",
|
||||
"resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
|
||||
@ -2929,18 +2819,6 @@
|
||||
"dev": true,
|
||||
"requires": {}
|
||||
},
|
||||
"pusher-js": {
|
||||
"version": "4.4.0",
|
||||
"resolved": "https://registry.npmjs.org/pusher-js/-/pusher-js-4.4.0.tgz",
|
||||
"integrity": "sha512-oxSEG764hqeGAqW9Ryq5KdGQrbM/2sBy5L6Jsh62GyRbRO4z0qI9EjQ6IfQSDhR59b/tY0ANuXD8+ZOZY9AOyg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"faye-websocket": "0.9.4",
|
||||
"tweetnacl": "^1.0.0",
|
||||
"tweetnacl-util": "^0.15.0",
|
||||
"xmlhttprequest": "^1.8.0"
|
||||
}
|
||||
},
|
||||
"queue-microtask": {
|
||||
"version": "1.2.3",
|
||||
"resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz",
|
||||
@ -3006,12 +2884,6 @@
|
||||
"queue-microtask": "^1.2.2"
|
||||
}
|
||||
},
|
||||
"safe-buffer": {
|
||||
"version": "5.2.1",
|
||||
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
|
||||
"integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
|
||||
"dev": true
|
||||
},
|
||||
"source-map-js": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz",
|
||||
@ -3122,18 +2994,6 @@
|
||||
"integrity": "sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==",
|
||||
"dev": true
|
||||
},
|
||||
"tweetnacl": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.3.tgz",
|
||||
"integrity": "sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw==",
|
||||
"dev": true
|
||||
},
|
||||
"tweetnacl-util": {
|
||||
"version": "0.15.1",
|
||||
"resolved": "https://registry.npmjs.org/tweetnacl-util/-/tweetnacl-util-0.15.1.tgz",
|
||||
"integrity": "sha512-RKJBIj8lySrShN4w6i/BonWp2Z/uxwC3h4y7xsRrpP59ZboCd0GpEVsOnMDYLMmKBpYhb5TgHzZXy7wTfYFBRw==",
|
||||
"dev": true
|
||||
},
|
||||
"update-browserslist-db": {
|
||||
"version": "1.0.10",
|
||||
"resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.10.tgz",
|
||||
@ -3172,35 +3032,12 @@
|
||||
"picomatch": "^2.3.1"
|
||||
}
|
||||
},
|
||||
"websocket-driver": {
|
||||
"version": "0.7.4",
|
||||
"resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.4.tgz",
|
||||
"integrity": "sha512-b17KeDIQVjvb0ssuSDF2cYXSg2iztliJ4B9WdsuB6J952qCPKmnVq4DyW5motImXHDC1cBT/1UezrJVsKw5zjg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"http-parser-js": ">=0.5.1",
|
||||
"safe-buffer": ">=5.1.0",
|
||||
"websocket-extensions": ">=0.1.1"
|
||||
}
|
||||
},
|
||||
"websocket-extensions": {
|
||||
"version": "0.1.4",
|
||||
"resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.4.tgz",
|
||||
"integrity": "sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg==",
|
||||
"dev": true
|
||||
},
|
||||
"wrappy": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
|
||||
"integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==",
|
||||
"dev": true
|
||||
},
|
||||
"xmlhttprequest": {
|
||||
"version": "1.8.0",
|
||||
"resolved": "https://registry.npmjs.org/xmlhttprequest/-/xmlhttprequest-1.8.0.tgz",
|
||||
"integrity": "sha512-58Im/U0mlVBLM38NdZjHyhuMtCqa61469k2YP/AaPbvCoV9aQGUpbJBj1QRm2ytRiVQBD/fsw7L2bJGDVQswBA==",
|
||||
"dev": true
|
||||
},
|
||||
"yaml": {
|
||||
"version": "1.10.2",
|
||||
"resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz",
|
||||
|
@ -19,7 +19,6 @@
|
||||
"prettier": "^3.2.5",
|
||||
"prettier-plugin-blade": "^2.1.6",
|
||||
"prettier-plugin-tailwindcss": "^0.5.11",
|
||||
"pusher-js": "^4.3.1",
|
||||
"tailwindcss": "^3.1.0",
|
||||
"tippy.js": "^6.3.7",
|
||||
"toastr": "^2.1.4",
|
||||
|
1
public/vendor/log-viewer/app.css
vendored
1
public/vendor/log-viewer/app.css
vendored
File diff suppressed because one or more lines are too long
2
public/vendor/log-viewer/app.js
vendored
2
public/vendor/log-viewer/app.js
vendored
File diff suppressed because one or more lines are too long
21
public/vendor/log-viewer/app.js.LICENSE.txt
vendored
21
public/vendor/log-viewer/app.js.LICENSE.txt
vendored
@ -1,21 +0,0 @@
|
||||
/*!
|
||||
* The buffer module from node.js, for the browser.
|
||||
*
|
||||
* @author Feross Aboukhadijeh <http://feross.org>
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
/*! #__NO_SIDE_EFFECTS__ */
|
||||
|
||||
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
||||
|
||||
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
||||
|
||||
/**
|
||||
* @license
|
||||
* Lodash <https://lodash.com/>
|
||||
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
||||
* Released under MIT license <https://lodash.com/license>
|
||||
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
||||
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||
*/
|
BIN
public/vendor/log-viewer/img/log-viewer-128.png
vendored
BIN
public/vendor/log-viewer/img/log-viewer-128.png
vendored
Binary file not shown.
Before Width: | Height: | Size: 1.8 KiB |
BIN
public/vendor/log-viewer/img/log-viewer-32.png
vendored
BIN
public/vendor/log-viewer/img/log-viewer-32.png
vendored
Binary file not shown.
Before Width: | Height: | Size: 526 B |
BIN
public/vendor/log-viewer/img/log-viewer-64.png
vendored
BIN
public/vendor/log-viewer/img/log-viewer-64.png
vendored
Binary file not shown.
Before Width: | Height: | Size: 970 B |
7
public/vendor/log-viewer/mix-manifest.json
vendored
7
public/vendor/log-viewer/mix-manifest.json
vendored
@ -1,7 +0,0 @@
|
||||
{
|
||||
"/app.js": "/app.js?id=fc139aeb14d759b4a2906fc46d6c8150",
|
||||
"/app.css": "/app.css?id=12c5e78a91987c11d8a0cc04436541e9",
|
||||
"/img/log-viewer-128.png": "/img/log-viewer-128.png?id=d576c6d2e16074d3f064e60fe4f35166",
|
||||
"/img/log-viewer-32.png": "/img/log-viewer-32.png?id=f8ec67d10f996aa8baf00df3b61eea6d",
|
||||
"/img/log-viewer-64.png": "/img/log-viewer-64.png?id=8902d596fc883ca9eb8105bb683568c6"
|
||||
}
|
@ -4,7 +4,7 @@
|
||||
|
||||
<form method="POST" action="{{ route("login") }}">
|
||||
@csrf
|
||||
<div x-data="{ isPasswordVisible: false }">
|
||||
<div>
|
||||
<!-- Email Address -->
|
||||
<div>
|
||||
<x-input-label for="email" :value="__('Email')" />
|
||||
@ -27,7 +27,7 @@ class="mt-1 block w-full"
|
||||
<x-text-input
|
||||
id="password"
|
||||
class="mt-1 block w-full"
|
||||
x-bind:type="isPasswordVisible ? 'text' : 'password'"
|
||||
type="password"
|
||||
name="password"
|
||||
required
|
||||
autocomplete="current-password"
|
||||
@ -50,21 +50,6 @@ class="rounded border-gray-300 text-indigo-600 shadow-sm focus:ring-indigo-500 d
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<!-- Show Password -->
|
||||
<div class="mt-4 block">
|
||||
<label for="show_password" class="float-right inline-flex items-center">
|
||||
<input
|
||||
id="show_password"
|
||||
type="checkbox"
|
||||
x-model="isPasswordVisible"
|
||||
class="rounded border-gray-300 text-indigo-600 shadow-sm focus:ring-indigo-500 dark:border-gray-700 dark:bg-gray-900 dark:focus:ring-indigo-600 dark:focus:ring-offset-gray-800"
|
||||
/>
|
||||
<span class="ml-2 text-sm text-gray-600 dark:text-gray-400">
|
||||
{{ __("Show password") }}
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mt-4 flex items-center justify-end">
|
||||
|
@ -2,32 +2,18 @@
|
||||
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
export NEEDRESTART_MODE=a
|
||||
export V_USERNAME=vito
|
||||
export V_PASSWORD=$(openssl rand -base64 12)
|
||||
export V_IP_ADDRESS=$(curl https://freeipapi.com --silent)
|
||||
export V_IS_DOMAIN=1
|
||||
|
||||
echo "Enter the domain you want to install Vito? (your-domain.com)"
|
||||
echo "Hit enter to use your IP address (${V_IP_ADDRESS}):"
|
||||
|
||||
read V_DOMAIN
|
||||
|
||||
if [[ -z "${V_DOMAIN}" ]]; then
|
||||
export V_DOMAIN=${V_IP_ADDRESS}
|
||||
export V_IS_DOMAIN=0
|
||||
if [[ -z "${V_USERNAME}" ]]; then
|
||||
export V_USERNAME=vito
|
||||
fi
|
||||
|
||||
echo "Enter your email address:"
|
||||
if [[ -z "${V_PASSWORD}" ]]; then
|
||||
export V_PASSWORD=$(openssl rand -base64 12)
|
||||
fi
|
||||
|
||||
read V_ADMIN_EMAIL
|
||||
|
||||
echo "Enter your password:"
|
||||
|
||||
read V_ADMIN_PASSWORD
|
||||
|
||||
if [[ -z "${V_DOMAIN}" ]]; then
|
||||
echo "Error: V_DOMAIN environment variable is not set."
|
||||
exit 1
|
||||
if [[ -z "${V_ADMIN_EMAIL}" ]]; then
|
||||
echo "Enter your email address:"
|
||||
read V_ADMIN_EMAIL
|
||||
fi
|
||||
|
||||
if [[ -z "${V_ADMIN_EMAIL}" ]]; then
|
||||
@ -35,6 +21,11 @@ if [[ -z "${V_ADMIN_EMAIL}" ]]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ -z "${V_ADMIN_PASSWORD}" ]]; then
|
||||
echo "Enter a password for Vito's dashboard:"
|
||||
read V_ADMIN_PASSWORD
|
||||
fi
|
||||
|
||||
if [[ -z "${V_ADMIN_PASSWORD}" ]]; then
|
||||
echo "Error: V_ADMIN_PASSWORD environment variable is not set."
|
||||
exit 1
|
||||
@ -96,10 +87,10 @@ fi
|
||||
service nginx start
|
||||
|
||||
# php
|
||||
export V_PHP_VERSION="8.1"
|
||||
export V_PHP_VERSION="8.2"
|
||||
add-apt-repository ppa:ondrej/php -y
|
||||
apt update
|
||||
apt install -y php${V_PHP_VERSION} php${V_PHP_VERSION}-fpm php${V_PHP_VERSION}-mbstring php${V_PHP_VERSION}-mcrypt php${V_PHP_VERSION}-gd php${V_PHP_VERSION}-xml php${V_PHP_VERSION}-curl php${V_PHP_VERSION}-gettext php${V_PHP_VERSION}-zip php${V_PHP_VERSION}-bcmath php${V_PHP_VERSION}-soap php${V_PHP_VERSION}-redis
|
||||
apt install -y php${V_PHP_VERSION} php${V_PHP_VERSION}-fpm php${V_PHP_VERSION}-mbstring php${V_PHP_VERSION}-mcrypt php${V_PHP_VERSION}-gd php${V_PHP_VERSION}-xml php${V_PHP_VERSION}-curl php${V_PHP_VERSION}-gettext php${V_PHP_VERSION}-zip php${V_PHP_VERSION}-bcmath php${V_PHP_VERSION}-soap php${V_PHP_VERSION}-redis php${V_PHP_VERSION}-sqlite3
|
||||
if ! sed -i "s/www-data/${V_USERNAME}/g" /etc/php/${V_PHP_VERSION}/fpm/pool.d/www.conf; then
|
||||
echo 'Error installing PHP' && exit 1
|
||||
fi
|
||||
@ -113,15 +104,14 @@ curl -sS https://getcomposer.org/installer -o composer-setup.php
|
||||
php composer-setup.php --install-dir=/usr/local/bin --filename=composer
|
||||
|
||||
# setup website
|
||||
export V_SSL=${V_SSL:-1}
|
||||
export COMPOSER_ALLOW_SUPERUSER=1
|
||||
export V_REPO="https://github.com/vitodeploy/vito.git"
|
||||
export V_VHOST_CONFIG="
|
||||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
server_name ${V_DOMAIN};
|
||||
root /home/${V_USERNAME}/${V_DOMAIN}/public;
|
||||
server_name _;
|
||||
root /home/${V_USERNAME}/vito/public;
|
||||
|
||||
add_header X-Frame-Options \"SAMEORIGIN\";
|
||||
add_header X-Content-Type-Options \"nosniff\";
|
||||
@ -150,42 +140,39 @@ server {
|
||||
}
|
||||
}
|
||||
"
|
||||
rm -rf /home/${V_USERNAME}/${V_DOMAIN}
|
||||
mkdir /home/${V_USERNAME}/${V_DOMAIN}
|
||||
chown -R ${V_USERNAME}:${V_USERNAME} /home/${V_USERNAME}/${V_DOMAIN}
|
||||
chmod -R 755 /home/${V_USERNAME}/${V_DOMAIN}
|
||||
echo "${V_VHOST_CONFIG}" | tee /etc/nginx/sites-available/${V_DOMAIN}
|
||||
ln -s /etc/nginx/sites-available/${V_DOMAIN} /etc/nginx/sites-enabled/
|
||||
rm -rf /home/${V_USERNAME}/vito
|
||||
mkdir /home/${V_USERNAME}/vito
|
||||
chown -R ${V_USERNAME}:${V_USERNAME} /home/${V_USERNAME}/vito
|
||||
chmod -R 755 /home/${V_USERNAME}/vito
|
||||
rm /etc/nginx/sites-available/default
|
||||
rm /etc/nginx/sites-enabled/default
|
||||
echo "${V_VHOST_CONFIG}" | tee /etc/nginx/sites-available/vito
|
||||
ln -s /etc/nginx/sites-available/vito /etc/nginx/sites-enabled/
|
||||
service nginx restart
|
||||
rm -rf /home/${V_USERNAME}/${V_DOMAIN}
|
||||
rm -rf /home/${V_USERNAME}/vito
|
||||
git config --global core.fileMode false
|
||||
git clone ${V_REPO} /home/${V_USERNAME}/${V_DOMAIN}
|
||||
find /home/${V_USERNAME}/${V_DOMAIN} -type d -exec chmod 755 {} \;
|
||||
find /home/${V_USERNAME}/${V_DOMAIN} -type f -exec chmod 644 {} \;
|
||||
cd /home/${V_USERNAME}/${V_DOMAIN} && git config core.fileMode false
|
||||
cd /home/${V_USERNAME}/${V_DOMAIN} && composer install --no-dev
|
||||
git clone -b 1.x ${V_REPO} /home/${V_USERNAME}/vito
|
||||
find /home/${V_USERNAME}/vito -type d -exec chmod 755 {} \;
|
||||
find /home/${V_USERNAME}/vito -type f -exec chmod 644 {} \;
|
||||
cd /home/${V_USERNAME}/vito && git config core.fileMode false
|
||||
cd /home/${V_USERNAME}/vito && composer install --no-dev
|
||||
cp .env.prod .env
|
||||
if [[ ${V_SSL} == 1 ]]; then
|
||||
export V_URL="https://${V_DOMAIN}"
|
||||
else
|
||||
export V_URL="http://${V_DOMAIN}"
|
||||
fi
|
||||
sed -i "s|APP_URL=.*|APP_URL=${V_URL}|" /home/${V_USERNAME}/${V_DOMAIN}/.env
|
||||
touch /home/${V_USERNAME}/vito/storage/database.sqlite
|
||||
php artisan key:generate
|
||||
php artisan storage:link
|
||||
php artisan migrate --force
|
||||
php artisan user:create Vito ${V_ADMIN_EMAIL} ${V_ADMIN_PASSWORD}
|
||||
openssl genpkey -algorithm RSA -out /home/${V_USERNAME}/${V_DOMAIN}/storage/ssh-private.pem
|
||||
chmod 600 /home/${V_USERNAME}/${V_DOMAIN}/storage/ssh-private.pem
|
||||
ssh-keygen -y -f /home/${V_USERNAME}/${V_DOMAIN}/storage/ssh-private.pem > /home/${V_USERNAME}/${V_DOMAIN}/storage/ssh-public.key
|
||||
chown -R ${V_USERNAME}:${V_USERNAME} /home/${V_USERNAME}/${V_DOMAIN}/storage/ssh-private.pem
|
||||
chown -R ${V_USERNAME}:${V_USERNAME} /home/${V_USERNAME}/${V_DOMAIN}/storage/ssh-public.key
|
||||
openssl genpkey -algorithm RSA -out /home/${V_USERNAME}/vito/storage/ssh-private.pem
|
||||
chmod 600 /home/${V_USERNAME}/vito/storage/ssh-private.pem
|
||||
ssh-keygen -y -f /home/${V_USERNAME}/vito/storage/ssh-private.pem > /home/${V_USERNAME}/vito/storage/ssh-public.key
|
||||
chown -R ${V_USERNAME}:${V_USERNAME} /home/${V_USERNAME}/vito/storage/ssh-private.pem
|
||||
chown -R ${V_USERNAME}:${V_USERNAME} /home/${V_USERNAME}/vito/storage/ssh-public.key
|
||||
|
||||
# setup supervisor
|
||||
export V_WORKER_CONFIG="
|
||||
[program:worker]
|
||||
process_name=%(program_name)s_%(process_num)02d
|
||||
command=php /home/${V_USERNAME}/${V_DOMAIN}/artisan queue:work --sleep=3 --backoff=0 --queue=default,ssh,ssh-long --timeout=3600 --tries=1
|
||||
command=php /home/${V_USERNAME}/vito/artisan queue:work --sleep=3 --backoff=0 --queue=default,ssh,ssh-long --timeout=3600 --tries=1
|
||||
autostart=1
|
||||
autorestart=1
|
||||
user=vito
|
||||
@ -205,17 +192,13 @@ supervisorctl update
|
||||
supervisorctl start worker:*
|
||||
|
||||
# setup cronjobs
|
||||
echo "* * * * * cd /home/${V_USERNAME}/${V_DOMAIN} && php artisan schedule:run >> /dev/null 2>&1" | sudo -u ${V_USERNAME} crontab -
|
||||
|
||||
# make the update file executable
|
||||
chmod +x /home/${V_USERNAME}/${V_DOMAIN}/update.sh
|
||||
echo "* * * * * cd /home/${V_USERNAME}/vito && php artisan schedule:run >> /dev/null 2>&1" | sudo -u ${V_USERNAME} crontab -
|
||||
|
||||
# cleanup
|
||||
chown -R ${V_USERNAME}:${V_USERNAME} /home/${V_USERNAME}
|
||||
|
||||
# cache
|
||||
php artisan config:cache
|
||||
php artisan icons:cache
|
||||
|
||||
# print info
|
||||
echo "🎉 Congratulations!"
|
||||
@ -223,4 +206,3 @@ echo "✅ SSH User: ${V_USERNAME}"
|
||||
echo "✅ SSH Password: ${V_PASSWORD}"
|
||||
echo "✅ Admin Email: ${V_ADMIN_EMAIL}"
|
||||
echo "✅ Admin Password: ${V_ADMIN_PASSWORD}"
|
||||
echo "✅ URL: http://${V_DOMAIN}"
|
@ -1,3 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
cd /home/vito/vito
|
||||
|
||||
php artisan down
|
||||
|
||||
git pull
|
Loading…
x
Reference in New Issue
Block a user