├── .editorconfig ├── .env.example ├── .env.prod ├── .env.sail ├── .gitattributes ├── .gitignore ├── .prettierignore ├── .prettierrc ├── .scribe ├── .filehashes ├── auth.md ├── endpoints.cache │ ├── 00.yaml │ ├── 01.yaml │ ├── 02.yaml │ ├── 03.yaml │ ├── 04.yaml │ ├── 05.yaml │ ├── 06.yaml │ ├── 07.yaml │ ├── 08.yaml │ ├── 09.yaml │ ├── 10.yaml │ ├── 11.yaml │ ├── 12.yaml │ └── 13.yaml ├── endpoints │ ├── 00.yaml │ ├── 01.yaml │ ├── 02.yaml │ ├── 03.yaml │ ├── 04.yaml │ ├── 05.yaml │ ├── 06.yaml │ ├── 07.yaml │ ├── 08.yaml │ ├── 09.yaml │ ├── 10.yaml │ ├── 11.yaml │ ├── 12.yaml │ ├── 13.yaml │ └── custom.0.yaml └── intro.md ├── CONTRIBUTING.md ├── LICENSE ├── Makefile ├── README.md ├── SECURITY.md ├── app ├── Actions │ ├── CronJob │ │ ├── CreateCronJob.php │ │ ├── DeleteCronJob.php │ │ ├── DisableCronJob.php │ │ └── EnableCronJob.php │ ├── Database │ │ ├── CreateDatabase.php │ │ ├── CreateDatabaseUser.php │ │ ├── DeleteDatabase.php │ │ ├── DeleteDatabaseUser.php │ │ ├── LinkUser.php │ │ ├── ManageBackup.php │ │ ├── ManageBackupFile.php │ │ ├── RestoreBackup.php │ │ ├── RunBackup.php │ │ ├── SyncDatabaseUsers.php │ │ └── SyncDatabases.php │ ├── FileManager │ │ └── FetchFiles.php │ ├── FirewallRule │ │ └── ManageRule.php │ ├── Monitoring │ │ ├── GetMetrics.php │ │ └── UpdateMetricSettings.php │ ├── NodeJS │ │ ├── ChangeDefaultCli.php │ │ ├── InstallNewNodeJsVersion.php │ │ └── UninstallNodeJS.php │ ├── NotificationChannels │ │ ├── AddChannel.php │ │ └── EditChannel.php │ ├── PHP │ │ ├── ChangeDefaultCli.php │ │ ├── GetPHPIni.php │ │ ├── InstallNewPHP.php │ │ ├── InstallPHPExtension.php │ │ ├── UninstallPHP.php │ │ └── UpdatePHPIni.php │ ├── Projects │ │ ├── AddUser.php │ │ ├── CreateProject.php │ │ ├── DeleteProject.php │ │ └── UpdateProject.php │ ├── Redirect │ │ ├── CreateRedirect.php │ │ └── DeleteRedirect.php │ ├── SSL │ │ ├── ActivateSSL.php │ │ ├── CreateSSL.php │ │ └── DeleteSSL.php │ ├── Script │ │ ├── CreateScript.php │ │ ├── EditScript.php │ │ └── ExecuteScript.php │ ├── Server │ │ ├── CheckConnection.php │ │ ├── CreateServer.php │ │ ├── CreateServerLog.php │ │ ├── EditServer.php │ │ ├── RebootServer.php │ │ └── Update.php │ ├── ServerProvider │ │ ├── CreateServerProvider.php │ │ ├── DeleteServerProvider.php │ │ └── EditServerProvider.php │ ├── Service │ │ ├── Install.php │ │ ├── Manage.php │ │ └── Uninstall.php │ ├── Site │ │ ├── CreateCommand.php │ │ ├── CreateSite.php │ │ ├── DeleteSite.php │ │ ├── Deploy.php │ │ ├── EditCommand.php │ │ ├── ExecuteCommand.php │ │ ├── UpdateAliases.php │ │ ├── UpdateBranch.php │ │ ├── UpdateDeploymentScript.php │ │ ├── UpdateEnv.php │ │ ├── UpdateLoadBalancer.php │ │ ├── UpdatePHPVersion.php │ │ └── UpdateSourceControl.php │ ├── SourceControl │ │ ├── ConnectSourceControl.php │ │ ├── DeleteSourceControl.php │ │ └── EditSourceControl.php │ ├── SshKey │ │ ├── CreateSshKey.php │ │ ├── DeleteKeyFromServer.php │ │ └── DeployKeyToServer.php │ ├── StorageProvider │ │ ├── CreateStorageProvider.php │ │ ├── DeleteStorageProvider.php │ │ └── EditStorageProvider.php │ ├── Tag │ │ ├── CreateTag.php │ │ ├── DeleteTag.php │ │ ├── EditTag.php │ │ └── SyncTags.php │ ├── User │ │ ├── CreateUser.php │ │ ├── PasswordValidationRules.php │ │ ├── ResetUserPassword.php │ │ ├── UpdateProjects.php │ │ ├── UpdateUser.php │ │ ├── UpdateUserPassword.php │ │ └── UpdateUserProfileInformation.php │ └── Worker │ │ ├── CreateWorker.php │ │ ├── DeleteWorker.php │ │ ├── EditWorker.php │ │ ├── GetWorkerLogs.php │ │ └── ManageWorker.php ├── Console │ ├── Commands │ │ ├── ClearLogsCommand.php │ │ ├── CreateUserCommand.php │ │ ├── DeleteOlderMetricsCommand.php │ │ ├── GenerateKeysCommand.php │ │ ├── GetMetricsCommand.php │ │ ├── MigrateFromMysqlToSqlite.php │ │ └── RunBackupCommand.php │ └── Kernel.php ├── Enums │ ├── BackupFileStatus.php │ ├── BackupStatus.php │ ├── CommandExecutionStatus.php │ ├── CronjobStatus.php │ ├── Database.php │ ├── DatabaseStatus.php │ ├── DatabaseUserStatus.php │ ├── DeploymentStatus.php │ ├── FirewallRuleStatus.php │ ├── LoadBalancerMethod.php │ ├── LogType.php │ ├── NodeJS.php │ ├── NotificationChannel.php │ ├── OperatingSystem.php │ ├── PHP.php │ ├── PHPIniType.php │ ├── RedirectStatus.php │ ├── ScriptExecutionStatus.php │ ├── ServerProvider.php │ ├── ServerStatus.php │ ├── ServerType.php │ ├── ServiceStatus.php │ ├── SiteFeature.php │ ├── SiteStatus.php │ ├── SiteType.php │ ├── SourceControl.php │ ├── SshKeyStatus.php │ ├── SslStatus.php │ ├── SslType.php │ ├── StorageProvider.php │ ├── UserRole.php │ ├── Webserver.php │ └── WorkerStatus.php ├── Exceptions │ ├── CouldNotConnectToProvider.php │ ├── DeploymentScriptIsEmptyException.php │ ├── FailedToDeleteServer.php │ ├── FailedToDeployGitHook.php │ ├── FailedToDeployGitKey.php │ ├── FailedToDestroyGitHook.php │ ├── GitRepositoryNotFound.php │ ├── Handler.php │ ├── RepositoryNotFound.php │ ├── RepositoryPermissionDenied.php │ ├── SSHAuthenticationError.php │ ├── SSHCommandError.php │ ├── SSHConnectionError.php │ ├── SSHError.php │ ├── SSHUploadFailed.php │ ├── SSLCreationException.php │ ├── ServerInstallationFailed.php │ ├── ServerProviderError.php │ ├── ServiceInstallationFailed.php │ └── SourceControlIsNotConnected.php ├── Facades │ ├── FTP.php │ ├── Notifier.php │ └── SSH.php ├── Helpers │ ├── Agent.php │ ├── FTP.php │ ├── Notifier.php │ └── SSH.php ├── Http │ ├── Controllers │ │ ├── API │ │ │ ├── AgentController.php │ │ │ ├── CronJobController.php │ │ │ ├── DatabaseController.php │ │ │ ├── DatabaseUserController.php │ │ │ ├── FirewallRuleController.php │ │ │ ├── GitHookController.php │ │ │ ├── HealthController.php │ │ │ ├── ProjectController.php │ │ │ ├── RedirectController.php │ │ │ ├── ServerController.php │ │ │ ├── ServerProviderController.php │ │ │ ├── ServerSSHKeyController.php │ │ │ ├── ServiceController.php │ │ │ ├── SiteController.php │ │ │ ├── SourceControlController.php │ │ │ └── StorageProviderController.php │ │ ├── ConsoleController.php │ │ └── Controller.php │ ├── Kernel.php │ ├── Middleware │ │ ├── Authenticate.php │ │ ├── CanSeeProjectMiddleware.php │ │ ├── EncryptCookies.php │ │ ├── HasProjectMiddleware.php │ │ ├── PreventRequestsDuringMaintenance.php │ │ ├── RedirectIfAuthenticated.php │ │ ├── TrimStrings.php │ │ ├── TrustHosts.php │ │ ├── TrustProxies.php │ │ ├── ValidateSignature.php │ │ └── VerifyCsrfToken.php │ └── Resources │ │ ├── CronJobResource.php │ │ ├── DatabaseResource.php │ │ ├── DatabaseUserResource.php │ │ ├── FirewallRuleResource.php │ │ ├── ProjectResource.php │ │ ├── RedirectResource.php │ │ ├── ServerProviderResource.php │ │ ├── ServerResource.php │ │ ├── ServiceResource.php │ │ ├── SiteResource.php │ │ ├── SourceControlResource.php │ │ ├── SshKeyResource.php │ │ ├── StorageProviderResource.php │ │ └── UserResource.php ├── Models │ ├── AbstractModel.php │ ├── Backup.php │ ├── BackupFile.php │ ├── Command.php │ ├── CommandExecution.php │ ├── CronJob.php │ ├── Database.php │ ├── DatabaseUser.php │ ├── Deployment.php │ ├── DeploymentScript.php │ ├── File.php │ ├── FirewallRule.php │ ├── GitHook.php │ ├── LoadBalancerServer.php │ ├── Metric.php │ ├── NotificationChannel.php │ ├── PersonalAccessToken.php │ ├── Project.php │ ├── Redirect.php │ ├── Script.php │ ├── ScriptExecution.php │ ├── Server.php │ ├── ServerLog.php │ ├── ServerProvider.php │ ├── Service.php │ ├── Site.php │ ├── SourceControl.php │ ├── SshKey.php │ ├── Ssl.php │ ├── StorageProvider.php │ ├── Tag.php │ ├── User.php │ └── Worker.php ├── NotificationChannels │ ├── AbstractNotificationChannel.php │ ├── Discord.php │ ├── Email.php │ ├── Email │ │ └── NotificationMail.php │ ├── NotificationChannel.php │ ├── Slack.php │ └── Telegram.php ├── Notifications │ ├── AbstractNotification.php │ ├── DeploymentCompleted.php │ ├── FailedToDeleteServerFromProvider.php │ ├── NotificationInterface.php │ ├── ServerDisconnected.php │ ├── ServerInstallationFailed.php │ ├── ServerInstallationStarted.php │ ├── ServerInstallationSucceed.php │ ├── ServerUpdateFailed.php │ ├── SiteInstallationFailed.php │ ├── SiteInstallationSucceed.php │ └── SourceControlDisconnected.php ├── Policies │ ├── BackupFilePolicy.php │ ├── BackupPolicy.php │ ├── CommandPolicy.php │ ├── CronJobPolicy.php │ ├── DatabasePolicy.php │ ├── DatabaseUserPolicy.php │ ├── FirewallRulePolicy.php │ ├── MetricPolicy.php │ ├── NotificationChannelPolicy.php │ ├── PersonalAccessTokenPolicy.php │ ├── ProjectPolicy.php │ ├── RedirectPolicy.php │ ├── ScriptPolicy.php │ ├── ServerLogPolicy.php │ ├── ServerPolicy.php │ ├── ServerProviderPolicy.php │ ├── ServicePolicy.php │ ├── SitePolicy.php │ ├── SourceControlPolicy.php │ ├── SshKeyPolicy.php │ ├── SslPolicy.php │ ├── StorageProviderPolicy.php │ ├── TagPolicy.php │ ├── UserPolicy.php │ └── WorkerPolicy.php ├── Providers │ ├── AppServiceProvider.php │ ├── AuthServiceProvider.php │ ├── DemoServiceProvider.php │ ├── RouteServiceProvider.php │ └── WebServiceProvider.php ├── SSH │ ├── Composer │ │ └── Composer.php │ ├── Cron │ │ └── Cron.php │ ├── Git │ │ └── Git.php │ ├── HasS3Storage.php │ ├── OS │ │ └── OS.php │ ├── PHPMyAdmin │ │ └── PHPMyAdmin.php │ ├── Services │ │ ├── AbstractService.php │ │ ├── Database │ │ │ ├── AbstractDatabase.php │ │ │ ├── Database.php │ │ │ ├── Mariadb.php │ │ │ ├── Mysql.php │ │ │ └── Postgresql.php │ │ ├── Firewall │ │ │ ├── AbstractFirewall.php │ │ │ ├── Firewall.php │ │ │ └── Ufw.php │ │ ├── Monitoring │ │ │ ├── RemoteMonitor │ │ │ │ └── RemoteMonitor.php │ │ │ └── VitoAgent │ │ │ │ └── VitoAgent.php │ │ ├── NodeJS │ │ │ └── NodeJS.php │ │ ├── PHP │ │ │ └── PHP.php │ │ ├── ProcessManager │ │ │ ├── AbstractProcessManager.php │ │ │ ├── ProcessManager.php │ │ │ └── Supervisor.php │ │ ├── Redis │ │ │ └── Redis.php │ │ ├── ServiceInterface.php │ │ └── Webserver │ │ │ ├── AbstractWebserver.php │ │ │ ├── Caddy.php │ │ │ ├── Nginx.php │ │ │ └── Webserver.php │ ├── Storage │ │ ├── AbstractStorage.php │ │ ├── Dropbox.php │ │ ├── FTP.php │ │ ├── Local.php │ │ ├── S3.php │ │ └── Storage.php │ ├── Systemd │ │ └── Systemd.php │ └── Wordpress │ │ └── Wordpress.php ├── ServerProviders │ ├── AWS.php │ ├── AbstractProvider.php │ ├── Custom.php │ ├── DigitalOcean.php │ ├── Hetzner.php │ ├── Linode.php │ ├── ServerProvider.php │ └── Vultr.php ├── ServerTypes │ ├── AbstractType.php │ ├── Database.php │ ├── Regular.php │ └── ServerType.php ├── SiteTypes │ ├── AbstractSiteType.php │ ├── Laravel.php │ ├── LoadBalancer.php │ ├── PHPBlank.php │ ├── PHPMyAdmin.php │ ├── PHPSite.php │ ├── SiteType.php │ └── Wordpress.php ├── SourceControlProviders │ ├── AbstractSourceControlProvider.php │ ├── Bitbucket.php │ ├── Github.php │ ├── Gitlab.php │ └── SourceControlProvider.php ├── StorageProviders │ ├── AbstractStorageProvider.php │ ├── Dropbox.php │ ├── FTP.php │ ├── Local.php │ ├── S3.php │ └── StorageProvider.php ├── Support │ ├── Testing │ │ ├── FTPFake.php │ │ └── SSHFake.php │ └── helpers.php ├── Traits │ ├── Enum.php │ ├── HasProjectThroughServer.php │ └── HasTimezoneTimestamps.php ├── ValidationRules │ ├── CronRule.php │ ├── DomainRule.php │ ├── RestrictedIPAddressesRule.php │ └── SshKeyRule.php └── Web │ ├── Components │ ├── Link.php │ └── Page.php │ ├── Contracts │ └── HasSecondSubNav.php │ ├── Fields │ ├── AlertField.php │ ├── CodeEditorField.php │ └── ProviderField.php │ └── Pages │ ├── Login.php │ ├── Scripts │ ├── Executions.php │ ├── Index.php │ └── Widgets │ │ ├── ScriptExecutionsList.php │ │ └── ScriptsList.php │ ├── Servers │ ├── Console │ │ ├── Index.php │ │ └── Widgets │ │ │ ├── Console.php │ │ │ └── StopCommand.php │ ├── CronJobs │ │ ├── Index.php │ │ └── Widgets │ │ │ └── CronJobsList.php │ ├── Databases │ │ ├── Backups.php │ │ ├── Index.php │ │ ├── Traits │ │ │ └── Navigation.php │ │ ├── Users.php │ │ └── Widgets │ │ │ ├── BackupFilesList.php │ │ │ ├── BackupsList.php │ │ │ ├── DatabaseUsersList.php │ │ │ └── DatabasesList.php │ ├── FileManager │ │ ├── Index.php │ │ └── Widgets │ │ │ └── FilesList.php │ ├── Firewall │ │ ├── Index.php │ │ └── Widgets │ │ │ └── RulesList.php │ ├── Index.php │ ├── Logs │ │ ├── Index.php │ │ ├── RemoteLogs.php │ │ ├── Traits │ │ │ └── Navigation.php │ │ └── Widgets │ │ │ └── LogsList.php │ ├── Metrics │ │ ├── Index.php │ │ └── Widgets │ │ │ ├── FilterForm.php │ │ │ ├── MetricDetails.php │ │ │ └── Metrics.php │ ├── NodeJS │ │ ├── Index.php │ │ └── Widgets │ │ │ └── NodeJSList.php │ ├── PHP │ │ ├── Index.php │ │ └── Widgets │ │ │ └── PHPList.php │ ├── Page.php │ ├── SSHKeys │ │ ├── Index.php │ │ └── Widgets │ │ │ └── SshKeysList.php │ ├── Services │ │ ├── Index.php │ │ └── Widgets │ │ │ └── ServicesList.php │ ├── Settings.php │ ├── Sites │ │ ├── Index.php │ │ ├── Page.php │ │ ├── Pages │ │ │ ├── Logs │ │ │ │ └── Index.php │ │ │ ├── Redirects │ │ │ │ ├── Actions │ │ │ │ │ └── Create.php │ │ │ │ ├── Index.php │ │ │ │ └── Widgets │ │ │ │ │ └── RedirectsList.php │ │ │ ├── SSL │ │ │ │ ├── Index.php │ │ │ │ └── Widgets │ │ │ │ │ └── SslsList.php │ │ │ └── Workers │ │ │ │ ├── Index.php │ │ │ │ └── Widgets │ │ │ │ └── WorkersList.php │ │ ├── Settings.php │ │ ├── View.php │ │ └── Widgets │ │ │ ├── Commands.php │ │ │ ├── DeploymentsList.php │ │ │ ├── Installing.php │ │ │ ├── LoadBalancerServers.php │ │ │ ├── SiteDetails.php │ │ │ ├── SiteSummary.php │ │ │ └── SitesList.php │ ├── View.php │ ├── Widgets │ │ ├── Installing.php │ │ ├── ServerDetails.php │ │ ├── ServerStats.php │ │ ├── ServerSummary.php │ │ ├── ServersList.php │ │ └── UpdateServerInfo.php │ └── Workers │ │ ├── Actions │ │ └── Create.php │ │ ├── Index.php │ │ └── Widgets │ │ └── WorkersList.php │ └── Settings │ ├── APIKeys │ ├── Index.php │ └── Widgets │ │ └── ApiKeysList.php │ ├── NotificationChannels │ ├── Actions │ │ ├── Create.php │ │ └── Edit.php │ ├── Index.php │ └── Widgets │ │ └── NotificationChannelsList.php │ ├── Profile │ ├── Index.php │ └── Widgets │ │ ├── BrowserSession.php │ │ ├── ProfileInformation.php │ │ ├── TwoFactor.php │ │ └── UpdatePassword.php │ ├── Projects │ ├── Index.php │ ├── Settings.php │ └── Widgets │ │ ├── AddUser.php │ │ ├── ProjectUsersList.php │ │ ├── ProjectsList.php │ │ ├── SelectProject.php │ │ └── UpdateProject.php │ ├── SSHKeys │ ├── Index.php │ └── Widgets │ │ └── SshKeysList.php │ ├── ServerProviders │ ├── Actions │ │ ├── Create.php │ │ └── Edit.php │ ├── Index.php │ └── Widgets │ │ └── ServerProvidersList.php │ ├── SourceControls │ ├── Actions │ │ ├── Create.php │ │ └── Edit.php │ ├── Index.php │ └── Widgets │ │ └── SourceControlsList.php │ ├── StorageProviders │ ├── Actions │ │ ├── Create.php │ │ └── Edit.php │ ├── Index.php │ └── Widgets │ │ └── StorageProvidersList.php │ ├── Tags │ ├── Actions │ │ ├── Create.php │ │ ├── Edit.php │ │ └── EditTags.php │ ├── Index.php │ └── Widgets │ │ └── TagsList.php │ └── Users │ ├── Index.php │ └── Widgets │ └── UsersList.php ├── artisan ├── bootstrap ├── app.php └── cache │ └── .gitignore ├── composer.json ├── composer.lock ├── config ├── app.php ├── auth.php ├── blade-heroicons.php ├── blade-icons.php ├── cache.php ├── core.php ├── cors.php ├── database.php ├── filament.php ├── filesystems.php ├── hashing.php ├── logging.php ├── mail.php ├── queue.php ├── route-attributes.php ├── scribe.php ├── serverproviders.php ├── services.php ├── session.php └── view.php ├── database ├── .gitignore ├── factories │ ├── BackupFactory.php │ ├── BackupFileFactory.php │ ├── CommandExecutionFactory.php │ ├── CommandFactory.php │ ├── CronJobFactory.php │ ├── DatabaseFactory.php │ ├── DatabaseUserFactory.php │ ├── DeploymentFactory.php │ ├── DeploymentScriptFactory.php │ ├── FileFactory.php │ ├── FirewallRuleFactory.php │ ├── GitHookFactory.php │ ├── LoadBalancerServerFactory.php │ ├── MetricFactory.php │ ├── NotificationChannelFactory.php │ ├── ProjectFactory.php │ ├── RedirectFactory.php │ ├── ScriptExecutionFactory.php │ ├── ScriptFactory.php │ ├── ServerFactory.php │ ├── ServerLogFactory.php │ ├── ServerProviderFactory.php │ ├── ServiceFactory.php │ ├── SiteFactory.php │ ├── SourceControlFactory.php │ ├── SshKeyFactory.php │ ├── SslFactory.php │ ├── StorageProviderFactory.php │ ├── TagFactory.php │ ├── UserFactory.php │ └── WorkerFactory.php ├── migrations │ ├── 2014_10_12_000000_create_users_table.php │ ├── 2014_10_12_100000_create_password_resets_table.php │ ├── 2018_08_08_100000_create_telescope_entries_table.php │ ├── 2019_08_19_000000_create_failed_jobs_table.php │ ├── 2019_12_14_000001_create_personal_access_tokens_table.php │ ├── 2021_06_23_192743_create_sessions_table.php │ ├── 2021_06_23_211827_create_servers_table.php │ ├── 2021_06_23_214143_create_services_table.php │ ├── 2021_06_25_102220_create_jobs_table.php │ ├── 2021_06_25_124831_create_server_logs_table.php │ ├── 2021_06_26_211903_create_sites_table.php │ ├── 2021_06_28_085814_create_source_controls_table.php │ ├── 2021_07_02_065815_create_deployments_table.php │ ├── 2021_07_03_133319_create_databases_table.php │ ├── 2021_07_03_133327_create_database_users_table.php │ ├── 2021_07_15_090830_create_firewall_rules_table.php │ ├── 2021_07_30_204454_create_cron_jobs_table.php │ ├── 2021_08_13_213657_create_deployment_scripts_table.php │ ├── 2021_08_14_165326_create_ssls_table.php │ ├── 2021_08_26_055643_create_redirects_table.php │ ├── 2021_08_27_064512_create_queues_table.php │ ├── 2021_08_29_210204_create_ssh_keys_table.php │ ├── 2021_08_30_174511_create_server_ssh_keys_table.php │ ├── 2021_11_12_093030_create_git_hooks_table.php │ ├── 2021_11_14_190808_create_server_providers_table.php │ ├── 2021_12_09_062430_create_scripts_table.php │ ├── 2021_12_10_204458_create_script_executions_table.php │ ├── 2021_12_24_151835_create_notification_channels_table.php │ ├── 2022_01_29_183900_create_storage_providers_table.php │ ├── 2022_02_11_085718_create_backups_table.php │ ├── 2022_02_11_085815_create_backup_files_table.php │ ├── 2023_07_21_210213_update_firewall_rules_table.php │ ├── 2023_07_23_143530_add_ssh_key_field_to_sites_table.php │ ├── 2023_07_30_163805_add_url_to_source_controls_table.php │ ├── 2023_07_30_200348_add_profile_to_source_controls_table.php │ ├── 2023_07_30_205328_add_source_control_id_to_sites_table.php │ ├── 2023_08_13_095440_update_storage_providers_table.php │ ├── 2023_08_17_231824_update_backups_table.php │ ├── 2023_08_25_183201_update_backup_files_table.php │ ├── 2023_09_10_185414_add_two_factor_fields_to_users_table.php │ ├── 2023_10_01_120250_create_projects_table.php │ ├── 2024_01_01_232932_update_servers_table.php │ ├── 2024_01_01_235900_update_users_table.php │ ├── 2024_04_07_204001_add_is_remote_to_server_logs_table.php │ ├── 2024_04_08_212940_create_metrics_table.php │ ├── 2024_04_24_213204_add_role_to_users_table.php │ ├── 2024_04_26_122230_create_user_project_table.php │ ├── 2024_04_26_123326_drop_user_id_from_projects_table.php │ ├── 2024_05_07_184201_add_project_id_to_source_controls_table.php │ ├── 2024_05_10_212155_add_updates_field_to_servers_table.php │ ├── 2024_06_06_093350_create_script_executions_table.php │ ├── 2024_06_24_211155_add_project_id_to_notification_channels_table.php │ ├── 2024_06_25_202655_add_project_id_to_storage_providers_table.php │ ├── 2024_06_25_212812_add_project_id_to_server_providers_table.php │ ├── 2024_08_09_180021_create_tags_table.php │ ├── 2024_08_09_181239_create_taggables_table.php │ ├── 2024_10_04_190341_add_soft_deletes_to_databases.php │ ├── 2024_10_05_094650_add_soft_deletes_to_source_controls.php │ ├── 2024_10_06_091631_add_log_id_to_ssls.php │ ├── 2024_10_06_160213_add_soft_deletes_to_ssh_keys.php │ ├── 2024_10_06_162253_add_project_id_to_scripts.php │ ├── 2024_10_06_174115_add_server_id_to_script_executions.php │ ├── 2024_12_22_134221_deprecate_wasabi_storage_provider.php │ ├── 2025_01_12_173141_add_user_to_sites.php │ ├── 2025_01_25_193815_drop_telescope_tables.php │ ├── 2025_01_27_181512_add_force_ssl_to_sites_table.php │ ├── 2025_01_29_192733_add_email_to_ssls_table.php │ ├── 2025_01_29_230359_create_load_balancer_servers_table.php │ ├── 2025_01_31_155828_update_ssls_table.php │ ├── 2025_02_02_124012_create_files_table.php │ ├── 2025_02_15_082027_update_firewall_rules_table.php │ ├── 2025_02_15_120213_update_databases_table.php │ ├── 2025_02_28_193416_create_commands_table.php │ ├── 2025_02_28_193517_create_command_executions_table.php │ └── 2025_03_16_081225_rename_queues_to_workers.php └── seeders │ ├── CronJobsSeeder.php │ ├── DatabaseSeeder.php │ ├── DatabasesSeeder.php │ ├── MetricsSeeder.php │ ├── NotificationChannelsSeeder.php │ ├── ProjectsSeeder.php │ ├── ServerLogsSeeder.php │ ├── ServerProvidersSeeder.php │ ├── ServersSeeder.php │ ├── SitesSeeder.php │ ├── SourceControlsSeeder.php │ ├── SshKeysSeeder.php │ ├── StorageProvidersSeeder.php │ ├── TagsSeeder.php │ └── UsersSeeder.php ├── docker-compose.yml ├── docker ├── Dockerfile ├── docker-compose.yml ├── nginx.conf ├── php.ini ├── publish.sh ├── start.sh └── supervisord.conf ├── lang └── en.json ├── package-lock.json ├── package.json ├── phpstan.neon ├── phpunit.xml ├── pint.json ├── postcss.config.js ├── public ├── .htaccess ├── api-docs │ ├── collection.json │ ├── css │ │ ├── theme-default.print.css │ │ └── theme-default.style.css │ ├── images │ │ └── navbar.png │ ├── index.html │ ├── js │ │ ├── theme-default-4.40.0.js │ │ └── tryitout-4.40.0.js │ └── openapi.yaml ├── build │ ├── assets │ │ ├── app-58d76f18.js │ │ └── theme-f92da083.css │ └── manifest.json ├── css │ └── filament │ │ ├── filament │ │ └── app.css │ │ ├── forms │ │ └── forms.css │ │ └── support │ │ └── support.css ├── favicon.ico ├── favicon │ ├── android-icon-144x144.png │ ├── android-icon-192x192.png │ ├── android-icon-36x36.png │ ├── android-icon-48x48.png │ ├── android-icon-72x72.png │ ├── android-icon-96x96.png │ ├── apple-icon-114x114.png │ ├── apple-icon-120x120.png │ ├── apple-icon-144x144.png │ ├── apple-icon-152x152.png │ ├── apple-icon-180x180.png │ ├── apple-icon-57x57.png │ ├── apple-icon-60x60.png │ ├── apple-icon-72x72.png │ ├── apple-icon-76x76.png │ ├── apple-icon-precomposed.png │ ├── apple-icon.png │ ├── browserconfig.xml │ ├── favicon-16x16.png │ ├── favicon-32x32.png │ ├── favicon-96x96.png │ ├── favicon.ico │ ├── manifest.json │ ├── ms-icon-144x144.png │ ├── ms-icon-150x150.png │ ├── ms-icon-310x310.png │ └── ms-icon-70x70.png ├── index.php ├── js │ └── filament │ │ ├── filament │ │ ├── app.js │ │ └── echo.js │ │ ├── forms │ │ └── components │ │ │ ├── color-picker.js │ │ │ ├── date-time-picker.js │ │ │ ├── file-upload.js │ │ │ ├── key-value.js │ │ │ ├── markdown-editor.js │ │ │ ├── rich-editor.js │ │ │ ├── select.js │ │ │ ├── tags-input.js │ │ │ └── textarea.js │ │ ├── notifications │ │ └── notifications.js │ │ ├── support │ │ ├── async-alpine.js │ │ └── support.js │ │ ├── tables │ │ └── components │ │ │ └── table.js │ │ └── widgets │ │ └── components │ │ ├── chart.js │ │ └── stats-overview │ │ └── stat │ │ └── chart.js └── robots.txt ├── rector.php ├── resources ├── css │ ├── app.css │ └── filament │ │ └── app │ │ ├── tailwind.config.js │ │ └── theme.css ├── js │ ├── ace-editor │ │ ├── ace-editor.js │ │ ├── mode-env.js │ │ ├── mode-nginx.js │ │ └── theme-vito.js │ ├── app.js │ └── components │ │ └── editor.js ├── svg │ ├── aws.svg │ ├── bitbucket.svg │ ├── caddy.svg │ ├── cpu.svg │ ├── custom.svg │ ├── digitalocean.svg │ ├── discord.svg │ ├── disk.svg │ ├── dropbox.svg │ ├── email.svg │ ├── force-ssl-disabled.svg │ ├── force-ssl-enabled.svg │ ├── ftp.svg │ ├── github.svg │ ├── gitlab.svg │ ├── google.svg │ ├── hetzner.svg │ ├── laravel.svg │ ├── linode.svg │ ├── load-balancer.svg │ ├── local.svg │ ├── logo.png │ ├── mariadb.svg │ ├── memory.svg │ ├── monitoring.svg │ ├── mysql.svg │ ├── nginx.svg │ ├── nodejs-alt.svg │ ├── nodejs.svg │ ├── php-alt.svg │ ├── php-blank.svg │ ├── php.svg │ ├── phpmyadmin.svg │ ├── plug.svg │ ├── postgresql.svg │ ├── redis.svg │ ├── remote-monitor.svg │ ├── s3.svg │ ├── server.svg │ ├── slack.svg │ ├── supervisor.svg │ ├── telegram.svg │ ├── ufw.svg │ ├── vito-agent.svg │ ├── vitomonitor.svg │ ├── vultr.svg │ ├── wordpress.svg │ └── www.svg └── views │ ├── components │ ├── app-version.blade.php │ ├── brand.blade.php │ ├── console-view.blade.php │ ├── console.blade.php │ ├── container.blade.php │ ├── dynamic-widget.blade.php │ ├── form.blade.php │ ├── infolist.blade.php │ ├── link.blade.php │ ├── page.blade.php │ └── progress-bar.blade.php │ ├── fields │ ├── alert.blade.php │ ├── code-editor.blade.php │ └── provider.blade.php │ ├── ssh │ ├── composer │ │ └── composer-install.blade.php │ ├── cron │ │ └── update.blade.php │ ├── git │ │ ├── checkout.blade.php │ │ ├── clone.blade.php │ │ └── fetch-origin.blade.php │ ├── os │ │ ├── available-updates.blade.php │ │ ├── cleanup.blade.php │ │ ├── create-isolated-user.blade.php │ │ ├── create-user.blade.php │ │ ├── delete-file.blade.php │ │ ├── delete-isolated-user.blade.php │ │ ├── delete-ssh-key.blade.php │ │ ├── deploy-ssh-key.blade.php │ │ ├── download.blade.php │ │ ├── edit-file.blade.php │ │ ├── extract.blade.php │ │ ├── generate-ssh-key.blade.php │ │ ├── get-public-key.blade.php │ │ ├── install-dependencies.blade.php │ │ ├── read-file.blade.php │ │ ├── read-ssh-key.blade.php │ │ ├── reboot.blade.php │ │ ├── resource-info.blade.php │ │ ├── run-script.blade.php │ │ ├── tail.blade.php │ │ └── upgrade.blade.php │ ├── phpmyadmin │ │ └── install.blade.php │ ├── services │ │ ├── database │ │ │ ├── mariadb │ │ │ │ ├── backup.blade.php │ │ │ │ ├── create-user.blade.php │ │ │ │ ├── create.blade.php │ │ │ │ ├── delete-user.blade.php │ │ │ │ ├── delete.blade.php │ │ │ │ ├── get-charsets.blade.php │ │ │ │ ├── get-db-list.blade.php │ │ │ │ ├── get-users-list.blade.php │ │ │ │ ├── install-1011.blade.php │ │ │ │ ├── install-103.blade.php │ │ │ │ ├── install-104.blade.php │ │ │ │ ├── install-106.blade.php │ │ │ │ ├── install-114.blade.php │ │ │ │ ├── link.blade.php │ │ │ │ ├── restore.blade.php │ │ │ │ ├── uninstall.blade.php │ │ │ │ └── unlink.blade.php │ │ │ ├── mysql │ │ │ │ ├── backup.blade.php │ │ │ │ ├── create-user.blade.php │ │ │ │ ├── create.blade.php │ │ │ │ ├── delete-user.blade.php │ │ │ │ ├── delete.blade.php │ │ │ │ ├── get-charsets.blade.php │ │ │ │ ├── get-db-list.blade.php │ │ │ │ ├── get-users-list.blade.php │ │ │ │ ├── install-57.blade.php │ │ │ │ ├── install-80.blade.php │ │ │ │ ├── install-84.blade.php │ │ │ │ ├── link.blade.php │ │ │ │ ├── restore.blade.php │ │ │ │ ├── uninstall.blade.php │ │ │ │ └── unlink.blade.php │ │ │ └── postgresql │ │ │ │ ├── backup.blade.php │ │ │ │ ├── create-user.blade.php │ │ │ │ ├── create.blade.php │ │ │ │ ├── delete-user.blade.php │ │ │ │ ├── delete.blade.php │ │ │ │ ├── get-charsets.blade.php │ │ │ │ ├── get-db-list.blade.php │ │ │ │ ├── get-users-list.blade.php │ │ │ │ ├── install-12.blade.php │ │ │ │ ├── install-13.blade.php │ │ │ │ ├── install-14.blade.php │ │ │ │ ├── install-15.blade.php │ │ │ │ ├── install-16.blade.php │ │ │ │ ├── link.blade.php │ │ │ │ ├── restore.blade.php │ │ │ │ ├── uninstall.blade.php │ │ │ │ └── unlink.blade.php │ │ ├── firewall │ │ │ └── ufw │ │ │ │ ├── apply-rules.blade.php │ │ │ │ ├── backup-rules.blade.php │ │ │ │ ├── clear-backups.blade.php │ │ │ │ ├── install-ufw.blade.php │ │ │ │ └── restore-rules.blade.php │ │ ├── monitoring │ │ │ └── vito-agent │ │ │ │ ├── install.blade.php │ │ │ │ └── uninstall.blade.php │ │ ├── nodejs │ │ │ ├── change-default-nodejs.blade.php │ │ │ ├── install-nodejs.blade.php │ │ │ └── uninstall-nodejs.blade.php │ │ ├── php │ │ │ ├── change-default-php.blade.php │ │ │ ├── fpm-pool.blade.php │ │ │ ├── install-composer.blade.php │ │ │ ├── install-php-extension.blade.php │ │ │ ├── install-php.blade.php │ │ │ ├── remove-fpm-pool.blade.php │ │ │ ├── uninstall-php.blade.php │ │ │ └── update-php-settings.blade.php │ │ ├── process-manager │ │ │ └── supervisor │ │ │ │ ├── create-worker.blade.php │ │ │ │ ├── delete-worker.blade.php │ │ │ │ ├── install-supervisor.blade.php │ │ │ │ ├── restart-worker.blade.php │ │ │ │ ├── start-worker.blade.php │ │ │ │ ├── stop-worker.blade.php │ │ │ │ ├── uninstall-supervisor.blade.php │ │ │ │ └── worker.blade.php │ │ ├── redis │ │ │ ├── install.blade.php │ │ │ └── uninstall.blade.php │ │ └── webserver │ │ │ ├── caddy │ │ │ ├── caddy-systemd.blade.php │ │ │ ├── caddy.blade.php │ │ │ ├── change-php-version.blade.php │ │ │ ├── create-custom-ssl.blade.php │ │ │ ├── create-path.blade.php │ │ │ ├── create-vhost.blade.php │ │ │ ├── delete-site.blade.php │ │ │ ├── get-vhost.blade.php │ │ │ ├── install-caddy.blade.php │ │ │ ├── redirects.blade.php │ │ │ ├── uninstall-caddy.blade.php │ │ │ └── vhost.blade.php │ │ │ └── nginx │ │ │ ├── change-php-version.blade.php │ │ │ ├── create-custom-ssl.blade.php │ │ │ ├── create-letsencrypt-ssl.blade.php │ │ │ ├── create-path.blade.php │ │ │ ├── create-vhost.blade.php │ │ │ ├── delete-site.blade.php │ │ │ ├── get-vhost.blade.php │ │ │ ├── install-nginx.blade.php │ │ │ ├── nginx.blade.php │ │ │ ├── redirects.blade.php │ │ │ ├── uninstall-nginx.blade.php │ │ │ └── vhost.blade.php │ ├── storage │ │ ├── dropbox │ │ │ ├── delete-file.blade.php │ │ │ ├── download.blade.php │ │ │ └── upload.blade.php │ │ ├── ftp │ │ │ ├── delete-file.blade.php │ │ │ ├── download.blade.php │ │ │ └── upload.blade.php │ │ ├── local │ │ │ ├── download.blade.php │ │ │ └── upload.blade.php │ │ └── s3 │ │ │ ├── delete-file.blade.php │ │ │ ├── download.blade.php │ │ │ └── upload.blade.php │ └── wordpress │ │ └── install.blade.php │ ├── vendor │ └── filament-panels │ │ └── components │ │ └── header │ │ └── simple.blade.php │ └── widgets │ └── select-project.blade.php ├── sail ├── scripts ├── install.sh ├── post-update.sh └── update.sh ├── storage ├── app │ ├── .gitignore │ └── public │ │ └── .gitignore ├── framework │ ├── .gitignore │ ├── cache │ │ ├── .gitignore │ │ └── data │ │ │ └── .gitignore │ ├── sessions │ │ └── .gitignore │ ├── testing │ │ └── .gitignore │ └── views │ │ └── .gitignore └── logs │ └── .gitignore ├── tests ├── CreatesApplication.php ├── Feature │ ├── API │ │ ├── CronjobTest.php │ │ ├── DatabaseTest.php │ │ ├── DatabaseUserTest.php │ │ ├── FirewallTest.php │ │ ├── ProjectsTest.php │ │ ├── RedirectsTest.php │ │ ├── ServerProvidersTest.php │ │ ├── ServerSshKeysTest.php │ │ ├── ServerTest.php │ │ ├── ServicesTest.php │ │ ├── SitesTest.php │ │ ├── SourceControlsTest.php │ │ └── StorageProvidersTest.php │ ├── ApplicationTest.php │ ├── CommandsTest.php │ ├── ConsoleTest.php │ ├── CronjobTest.php │ ├── DatabaseBackupTest.php │ ├── DatabaseTest.php │ ├── DatabaseUserTest.php │ ├── FileManagerTest.php │ ├── FirewallTest.php │ ├── LoadBalancerTest.php │ ├── LogsTest.php │ ├── MetricsTest.php │ ├── NodeJSTest.php │ ├── NotificationChannelsTest.php │ ├── PHPTest.php │ ├── ProfileTest.php │ ├── ProjectsTest.php │ ├── RedirectsTest.php │ ├── ScriptTest.php │ ├── ServerKeysTest.php │ ├── ServerProvidersTest.php │ ├── ServerTest.php │ ├── ServicesTest.php │ ├── SiteLogsTest.php │ ├── SitesTest.php │ ├── SourceControlsTest.php │ ├── SshKeysTest.php │ ├── SslTest.php │ ├── StorageProvidersTest.php │ ├── TagsTest.php │ ├── UserTest.php │ └── WorkersTest.php ├── TestCase.php ├── Traits │ └── PrepareLoadBalancer.php └── Unit │ ├── Actions │ └── Service │ │ ├── InstallTest.php │ │ └── UninstallTest.php │ ├── Commands │ ├── CreateUserCommandTest.php │ ├── DeleteOlderMetricsCommandTest.php │ ├── GetMetricsCommandTest.php │ └── RunBackupCommandTest.php │ ├── Helpers │ └── AgentTest.php │ ├── Models │ └── ServerModelTest.php │ ├── NotificationChannels │ ├── DiscordTest.php │ ├── EmailTest.php │ ├── SlackTest.php │ ├── TelegramTest.php │ └── TestNotification.php │ ├── SSH │ └── Services │ │ └── Database │ │ ├── GetCharsetsTest.php │ │ ├── GetDatabasesTest.php │ │ └── GetUsersTest.php │ ├── SourceControlProviders │ └── GitlabTest.php │ └── StorageProviders │ └── S3Test.php └── vite.config.js /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | end_of_line = lf 6 | indent_size = 4 7 | indent_style = space 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | ij_any_block_comment_at_first_column = false 11 | 12 | [*.md] 13 | trim_trailing_whitespace = false 14 | 15 | [*.{yml,yaml}] 16 | indent_size = 2 17 | 18 | [docker-compose.yml] 19 | indent_size = 4 20 | -------------------------------------------------------------------------------- /.env.example: -------------------------------------------------------------------------------- 1 | APP_NAME=Vito 2 | APP_ENV=local 3 | APP_KEY= 4 | APP_DEBUG=true 5 | APP_URL= 6 | 7 | FILESYSTEM_DRIVER=local 8 | 9 | MAIL_MAILER=smtp 10 | MAIL_HOST= 11 | MAIL_PORT= 12 | MAIL_USERNAME=null 13 | MAIL_PASSWORD=null 14 | MAIL_ENCRYPTION=null 15 | MAIL_FROM_ADDRESS="noreply@${APP_NAME}" 16 | MAIL_FROM_NAME="${APP_NAME}" 17 | 18 | APP_PORT=8000 19 | 20 | SCRIBE_AUTH_KEY="YOUR-API-KEY" 21 | -------------------------------------------------------------------------------- /.env.prod: -------------------------------------------------------------------------------- 1 | APP_NAME=Vito 2 | APP_ENV=production 3 | APP_KEY= 4 | APP_DEBUG=false 5 | APP_URL= 6 | 7 | FILESYSTEM_DRIVER=local 8 | 9 | MAIL_MAILER=smtp 10 | MAIL_HOST= 11 | MAIL_PORT= 12 | MAIL_USERNAME=null 13 | MAIL_PASSWORD=null 14 | MAIL_ENCRYPTION=null 15 | MAIL_FROM_ADDRESS="noreply@${APP_NAME}" 16 | MAIL_FROM_NAME="${APP_NAME}" 17 | -------------------------------------------------------------------------------- /.env.sail: -------------------------------------------------------------------------------- 1 | APP_NAME=Vito 2 | APP_ENV=local 3 | APP_KEY= 4 | APP_DEBUG=true 5 | APP_URL= 6 | APP_PORT=8000 7 | 8 | FILESYSTEM_DRIVER=local 9 | 10 | MAIL_MAILER=smtp 11 | MAIL_HOST= 12 | MAIL_PORT= 13 | MAIL_USERNAME=null 14 | MAIL_PASSWORD=null 15 | MAIL_ENCRYPTION=null 16 | MAIL_FROM_ADDRESS="noreply@${APP_NAME}" 17 | MAIL_FROM_NAME="${APP_NAME}" 18 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto eol=lf 2 | 3 | *.blade.php diff=html 4 | *.css diff=css 5 | *.html diff=html 6 | *.md diff=markdown 7 | *.php diff=php 8 | 9 | /.github export-ignore 10 | CHANGELOG.md export-ignore 11 | .styleci.yml export-ignore 12 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /.phpunit.cache 2 | /node_modules 3 | /public/hot 4 | /public/storage 5 | /storage/*.key 6 | /storage/*.pem 7 | /storage/test-key 8 | /storage/test-key.pub 9 | /vendor 10 | /storage/database.sqlite 11 | /storage/database-test.sqlite 12 | .env 13 | .env.backup 14 | .env.production 15 | .phpunit.result.cache 16 | Homestead.json 17 | Homestead.yaml 18 | auth.json 19 | npm-debug.log 20 | yarn-error.log 21 | /.fleet 22 | /.idea 23 | /.vscode 24 | laradumps.yaml 25 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | .git/ 2 | .scribe/ 3 | node_modules/ 4 | public/ 5 | storage/ 6 | vendor/ 7 | composer.lock 8 | .env 9 | .env.example 10 | sail 11 | *.md 12 | *.yml 13 | !*.blade.php 14 | !*.sh 15 | resources/views/ssh/ 16 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "plugins": [ 3 | "prettier-plugin-blade", 4 | "prettier-plugin-tailwindcss", 5 | "prettier-plugin-sh" 6 | ], 7 | "overrides": [ 8 | { 9 | "files": ["*.blade.php"], 10 | "options": { 11 | "parser": "blade", 12 | "printWidth": 120, 13 | "htmlWhitespaceSensitivity": "ignore", 14 | "tabWidth": 4, 15 | "quoteProps": "consistent", 16 | "trailingComma": "none" 17 | } 18 | }, 19 | { 20 | "files": ["*.sh"], 21 | "options": { 22 | "parser": "sh" 23 | } 24 | } 25 | ] 26 | } 27 | -------------------------------------------------------------------------------- /.scribe/.filehashes: -------------------------------------------------------------------------------- 1 | # GENERATED. YOU SHOULDN'T MODIFY OR DELETE THIS FILE. 2 | # Scribe uses this file to know when you change something manually in your docs. 3 | .scribe/intro.md=98adb6862b118c06e02e4e22390feb6f 4 | .scribe/auth.md=7fcc12b2e5a86fa9c49f509d348f3cc2 -------------------------------------------------------------------------------- /.scribe/auth.md: -------------------------------------------------------------------------------- 1 | # Authenticating requests 2 | 3 | To authenticate requests, include an **`Authorization`** header with the value **`"Bearer YOUR-API-KEY"`**. 4 | 5 | All authenticated endpoints are marked with a `requires authentication` badge in the documentation below. 6 | 7 | You can retrieve your token by visiting here 8 | -------------------------------------------------------------------------------- /.scribe/intro.md: -------------------------------------------------------------------------------- 1 | # Introduction 2 | 3 | VitoDeploy's API documentation. 4 | 5 | 8 | 9 | This documentation aims to provide all the information you need to work with our API. 10 | 11 | 13 | 14 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | Please read the contribution guide on the website 4 | 5 | https://vitodeploy.com/prologue/contribution-guide.html 6 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | start: 2 | ./sail up 3 | 4 | stop: 5 | ./sail down 6 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | ## Supported Versions 4 | 5 | | Version | New Features | Bug Fixes | Security Fixes | 6 | |---------|--------------|-----------|----------------------| 7 | | 0.x | ❌ | ❌ | ❌ | 8 | | 1.x | ❌ | ❌ | ✅ (Until March 2025) | 9 | | 2.x | ✅ | ✅ | ✅ | 10 | 11 | ## Reporting a Vulnerability 12 | 13 | If you see a vulnerability, please open an issue or report it directly to me (sa.vaziry@gmail.com) 14 | -------------------------------------------------------------------------------- /app/Actions/CronJob/DeleteCronJob.php: -------------------------------------------------------------------------------- 1 | user; 14 | $cronJob->status = CronjobStatus::DELETING; 15 | $cronJob->save(); 16 | $server->cron()->update($cronJob->user, CronJob::crontab($server, $user)); 17 | $cronJob->delete(); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /app/Actions/CronJob/DisableCronJob.php: -------------------------------------------------------------------------------- 1 | status = CronjobStatus::DISABLING; 14 | $cronJob->save(); 15 | 16 | $server->cron()->update($cronJob->user, CronJob::crontab($server, $cronJob->user)); 17 | $cronJob->status = CronjobStatus::DISABLED; 18 | $cronJob->save(); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /app/Actions/CronJob/EnableCronJob.php: -------------------------------------------------------------------------------- 1 | status = CronjobStatus::ENABLING; 14 | $cronJob->save(); 15 | 16 | $server->cron()->update($cronJob->user, CronJob::crontab($server, $cronJob->user)); 17 | $cronJob->status = CronjobStatus::READY; 18 | $cronJob->save(); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /app/Actions/Database/DeleteDatabase.php: -------------------------------------------------------------------------------- 1 | database(); 16 | /** @var \App\SSH\Services\Database\Database $handler */ 17 | $handler = $service->handler(); 18 | $handler->delete($database->name); 19 | $database->delete(); 20 | 21 | $database->backups()->each(function (Backup $backup): void { 22 | app(ManageBackup::class)->stop($backup); 23 | }); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /app/Actions/Database/DeleteDatabaseUser.php: -------------------------------------------------------------------------------- 1 | database(); 16 | /** @var Database $handler */ 17 | $handler = $service->handler(); 18 | $handler->deleteUser($databaseUser->username, $databaseUser->host); 19 | $databaseUser->delete(); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /app/Actions/SSL/ActivateSSL.php: -------------------------------------------------------------------------------- 1 | site->ssls()->update(['is_active' => false]); 12 | $ssl->is_active = true; 13 | $ssl->save(); 14 | $ssl->site->webserver()->updateVHost($ssl->site); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /app/Actions/SSL/DeleteSSL.php: -------------------------------------------------------------------------------- 1 | status = SslStatus::DELETING; 15 | $ssl->save(); 16 | /** @var Service $service */ 17 | $service = $ssl->site->server->webserver(); 18 | /** @var Webserver $webserver */ 19 | $webserver = $service->handler(); 20 | $webserver->removeSSL($ssl); 21 | $ssl->delete(); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /app/Actions/Server/RebootServer.php: -------------------------------------------------------------------------------- 1 | os()->reboot(); 15 | $server->status = ServerStatus::DISCONNECTED; 16 | $server->save(); 17 | } catch (Throwable) { 18 | $server = $server->checkConnection(); 19 | } 20 | 21 | return $server; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /app/Actions/Server/Update.php: -------------------------------------------------------------------------------- 1 | status = ServerStatus::UPDATING; 15 | $server->save(); 16 | dispatch(function () use ($server): void { 17 | $server->os()->upgrade(); 18 | $server->checkConnection(); 19 | $server->checkForUpdates(); 20 | })->catch(function () use ($server): void { 21 | Notifier::send($server, new ServerUpdateFailed($server)); 22 | $server->checkConnection(); 23 | })->onConnection('ssh'); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /app/Actions/ServerProvider/DeleteServerProvider.php: -------------------------------------------------------------------------------- 1 | servers()->exists()) { 13 | throw ValidationException::withMessages([ 14 | 'provider' => 'This server provider is being used by a server.', 15 | ]); 16 | } 17 | 18 | $serverProvider->delete(); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /app/Actions/Site/EditCommand.php: -------------------------------------------------------------------------------- 1 | $input 11 | */ 12 | public function edit(Command $command, array $input): Command 13 | { 14 | $command->name = $input['name']; 15 | $command->command = $input['command']; 16 | $command->save(); 17 | 18 | return $command; 19 | } 20 | 21 | /** 22 | * @return array> 23 | */ 24 | public static function rules(): array 25 | { 26 | return [ 27 | 'name' => ['required', 'string', 'max:255'], 28 | 'command' => ['required', 'string'], 29 | ]; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /app/Actions/Site/UpdateBranch.php: -------------------------------------------------------------------------------- 1 | $input 13 | * 14 | * @throws SSHError 15 | */ 16 | public function update(Site $site, array $input): void 17 | { 18 | $site->branch = $input['branch']; 19 | app(Git::class)->fetchOrigin($site); 20 | app(Git::class)->checkout($site); 21 | $site->save(); 22 | } 23 | 24 | /** 25 | * @return array 26 | */ 27 | public static function rules(): array 28 | { 29 | return [ 30 | 'branch' => 'required', 31 | ]; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /app/Actions/Site/UpdateDeploymentScript.php: -------------------------------------------------------------------------------- 1 | $input 12 | */ 13 | public function update(Site $site, array $input): void 14 | { 15 | /** @var DeploymentScript $script */ 16 | $script = $site->deploymentScript; 17 | $script->content = $input['script']; 18 | $script->save(); 19 | } 20 | 21 | /** 22 | * @return array> 23 | */ 24 | public static function rules(): array 25 | { 26 | return [ 27 | 'script' => ['required', 'string'], 28 | ]; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/Actions/Site/UpdateEnv.php: -------------------------------------------------------------------------------- 1 | $input 12 | * 13 | * @throws SSHError 14 | */ 15 | public function update(Site $site, array $input): void 16 | { 17 | $site->server->os()->editFileAs( 18 | $site->path.'/.env', 19 | $site->user, 20 | trim((string) $input['env']), 21 | ); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /app/Actions/SourceControl/DeleteSourceControl.php: -------------------------------------------------------------------------------- 1 | sites()->exists()) { 13 | throw ValidationException::withMessages([ 14 | 'source_control' => __('This source control is being used by a site.'), 15 | ]); 16 | } 17 | 18 | $sourceControl->delete(); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /app/Actions/SshKey/DeleteKeyFromServer.php: -------------------------------------------------------------------------------- 1 | servers()->updateExistingPivot($server->id, [ 18 | 'status' => SshKeyStatus::DELETING, 19 | ]); 20 | $server->os()->deleteSSHKey($sshKey->public_key); 21 | $server->sshKeys()->detach($sshKey); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /app/Actions/StorageProvider/DeleteStorageProvider.php: -------------------------------------------------------------------------------- 1 | backups()->exists()) { 13 | throw ValidationException::withMessages([ 14 | 'provider' => __('This storage provider is being used by a backup.'), 15 | ]); 16 | } 17 | 18 | $storageProvider->delete(); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /app/Actions/Tag/DeleteTag.php: -------------------------------------------------------------------------------- 1 | where('tag_id', $tag->id)->delete(); 13 | $tag->delete(); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /app/Actions/User/PasswordValidationRules.php: -------------------------------------------------------------------------------- 1 | 11 | */ 12 | protected function passwordRules(): array 13 | { 14 | return ['required', 'string', new Password, 'confirmed']; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /app/Actions/Worker/DeleteWorker.php: -------------------------------------------------------------------------------- 1 | delete(); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /app/Actions/Worker/GetWorkerLogs.php: -------------------------------------------------------------------------------- 1 | server->processManager(); 15 | 16 | /** @var ProcessManager $handler */ 17 | $handler = $service->handler(); 18 | 19 | return $handler->getLogs($worker->user, $worker->getLogFile()); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /app/Console/Commands/ClearLogsCommand.php: -------------------------------------------------------------------------------- 1 | info('Clearing logs...'); 19 | 20 | ServerLog::query()->delete(); 21 | 22 | File::cleanDirectory(Storage::disk('server-logs')->path('')); 23 | 24 | $this->info('Logs cleared!'); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/Enums/BackupFileStatus.php: -------------------------------------------------------------------------------- 1 | log; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /app/Exceptions/SSHUploadFailed.php: -------------------------------------------------------------------------------- 1 | json([ 20 | 'success' => true, 21 | 'version' => config('app.version'), 22 | ]); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /app/Http/Controllers/Controller.php: -------------------------------------------------------------------------------- 1 | expectsJson() ? null : url('/'); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /app/Http/Middleware/CanSeeProjectMiddleware.php: -------------------------------------------------------------------------------- 1 | user(); 19 | 20 | /** @var Project $project */ 21 | $project = $request->route('project'); 22 | 23 | if (! $user->can('view', $project)) { 24 | abort(403, 'You do not have permission to view this project.'); 25 | } 26 | 27 | return $next($request); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /app/Http/Middleware/EncryptCookies.php: -------------------------------------------------------------------------------- 1 | 13 | */ 14 | protected $except = [ 15 | // 16 | ]; 17 | } 18 | -------------------------------------------------------------------------------- /app/Http/Middleware/PreventRequestsDuringMaintenance.php: -------------------------------------------------------------------------------- 1 | 13 | */ 14 | protected $except = [ 15 | // 16 | ]; 17 | } 18 | -------------------------------------------------------------------------------- /app/Http/Middleware/TrimStrings.php: -------------------------------------------------------------------------------- 1 | 13 | */ 14 | protected $except = [ 15 | 'current_password', 16 | 'password', 17 | 'password_confirmation', 18 | ]; 19 | } 20 | -------------------------------------------------------------------------------- /app/Http/Middleware/TrustHosts.php: -------------------------------------------------------------------------------- 1 | 13 | */ 14 | public function hosts(): array 15 | { 16 | return [ 17 | $this->allSubdomainsOfApplicationUrl(), 18 | ]; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /app/Http/Middleware/TrustProxies.php: -------------------------------------------------------------------------------- 1 | |string|null 14 | */ 15 | protected $proxies = '*'; 16 | 17 | /** 18 | * The headers that should be used to detect proxies. 19 | * 20 | * @var int 21 | */ 22 | protected $headers = 23 | Request::HEADER_X_FORWARDED_FOR | 24 | Request::HEADER_X_FORWARDED_HOST | 25 | Request::HEADER_X_FORWARDED_PORT | 26 | Request::HEADER_X_FORWARDED_PROTO | 27 | Request::HEADER_X_FORWARDED_AWS_ELB; 28 | } 29 | -------------------------------------------------------------------------------- /app/Http/Middleware/ValidateSignature.php: -------------------------------------------------------------------------------- 1 | 13 | */ 14 | protected $except = [ 15 | // 'fbclid', 16 | // 'utm_campaign', 17 | // 'utm_content', 18 | // 'utm_medium', 19 | // 'utm_source', 20 | // 'utm_term', 21 | ]; 22 | } 23 | -------------------------------------------------------------------------------- /app/Http/Middleware/VerifyCsrfToken.php: -------------------------------------------------------------------------------- 1 | 13 | */ 14 | protected $except = [ 15 | // 16 | ]; 17 | } 18 | -------------------------------------------------------------------------------- /app/Http/Resources/DatabaseResource.php: -------------------------------------------------------------------------------- 1 | 14 | */ 15 | public function toArray(Request $request): array 16 | { 17 | return [ 18 | 'id' => $this->id, 19 | 'server_id' => $this->server_id, 20 | 'name' => $this->name, 21 | 'status' => $this->status, 22 | 'created_at' => $this->created_at, 23 | 'updated_at' => $this->updated_at, 24 | ]; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/Http/Resources/ProjectResource.php: -------------------------------------------------------------------------------- 1 | 14 | */ 15 | public function toArray(Request $request): array 16 | { 17 | return [ 18 | 'id' => $this->id, 19 | 'name' => $this->name, 20 | 'created_at' => $this->created_at, 21 | 'updated_at' => $this->updated_at, 22 | ]; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /app/Http/Resources/SshKeyResource.php: -------------------------------------------------------------------------------- 1 | 14 | */ 15 | public function toArray(Request $request): array 16 | { 17 | return [ 18 | 'id' => $this->id, 19 | 'user' => $this->user_id ? new UserResource($this->user) : null, 20 | 'name' => $this->name, 21 | 'created_at' => $this->created_at, 22 | 'updated_at' => $this->updated_at, 23 | ]; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /app/Http/Resources/UserResource.php: -------------------------------------------------------------------------------- 1 | 14 | */ 15 | public function toArray(Request $request): array 16 | { 17 | return [ 18 | 'id' => $this->id, 19 | 'name' => $this->name, 20 | 'email' => $this->email, 21 | 'created_at' => $this->created_at, 22 | 'updated_at' => $this->updated_at, 23 | ]; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /app/Models/AbstractModel.php: -------------------------------------------------------------------------------- 1 | {$field}; 21 | $current[$key] = $value; 22 | $this->{$field} = $current; 23 | if ($save) { 24 | $this->save(); 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /app/Models/PersonalAccessToken.php: -------------------------------------------------------------------------------- 1 | $abilities 16 | * @property Carbon $last_used_at 17 | * @property Carbon $created_at 18 | * @property Carbon $updated_at 19 | */ 20 | class PersonalAccessToken extends SanctumPersonalAccessToken 21 | { 22 | use HasTimezoneTimestamps; 23 | } 24 | -------------------------------------------------------------------------------- /app/NotificationChannels/AbstractNotificationChannel.php: -------------------------------------------------------------------------------- 1 | subject = $subject; 16 | } 17 | 18 | public function build(): self 19 | { 20 | return $this->html($this->text); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /app/Notifications/NotificationInterface.php: -------------------------------------------------------------------------------- 1 | 14 | */ 15 | protected $policies = [ 16 | // 'App\Models\Model' => 'App\Policies\ModelPolicy', 17 | ]; 18 | 19 | /** 20 | * Register any authentication / authorization services. 21 | */ 22 | public function boot(): void 23 | { 24 | // 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/SSH/Composer/Composer.php: -------------------------------------------------------------------------------- 1 | server->ssh($site->user)->exec( 16 | view('ssh.composer.composer-install', [ 17 | 'path' => $site->path, 18 | 'phpVersion' => $site->php_version, 19 | ]), 20 | 'composer-install', 21 | $site->id 22 | ); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /app/SSH/Cron/Cron.php: -------------------------------------------------------------------------------- 1 | server->ssh()->exec( 18 | view('ssh.cron.update', [ 19 | 'cron' => $cron, 20 | 'user' => $user, 21 | ]), 22 | 'update-cron' 23 | ); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /app/SSH/HasS3Storage.php: -------------------------------------------------------------------------------- 1 | server->ssh($site->user)->exec( 16 | view('ssh.phpmyadmin.install', [ 17 | 'version' => $site->type_data['version'], 18 | 'path' => $site->path, 19 | ]), 20 | 'install-phpmyadmin', 21 | $site->id 22 | ); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /app/SSH/Services/Database/Mariadb.php: -------------------------------------------------------------------------------- 1 | $input 9 | * @return array 10 | */ 11 | public function creationRules(array $input): array; 12 | 13 | /** 14 | * @param array $input 15 | * @return array 16 | */ 17 | public function creationData(array $input): array; 18 | 19 | /** 20 | * @return array 21 | */ 22 | public function deletionRules(): array; 23 | 24 | /** 25 | * @return array 26 | */ 27 | public function data(): array; 28 | 29 | public function install(): void; 30 | 31 | public function uninstall(): void; 32 | } 33 | -------------------------------------------------------------------------------- /app/SSH/Services/Webserver/Webserver.php: -------------------------------------------------------------------------------- 1 | 9 | */ 10 | public function upload(string $src, string $dest): array; 11 | 12 | public function download(string $src, string $dest): void; 13 | 14 | public function delete(string $src): void; 15 | } 16 | -------------------------------------------------------------------------------- /app/ServerProviders/AbstractProvider.php: -------------------------------------------------------------------------------- 1 | path((string) $this->server->id)); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /app/ServerTypes/Database.php: -------------------------------------------------------------------------------- 1 | [ 11 | 'required', 12 | 'in:'.implode(',', config('core.databases')), 13 | ], 14 | ]; 15 | } 16 | 17 | public function data(array $input): array 18 | { 19 | return []; 20 | } 21 | 22 | public function createServices(array $input): void 23 | { 24 | $this->server->services()->forceDelete(); 25 | $this->addDatabase($input['database']); 26 | $this->addSupervisor(); 27 | $this->addRedis(); 28 | $this->addUfw(); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/ServerTypes/ServerType.php: -------------------------------------------------------------------------------- 1 | $input 9 | * @return array 10 | */ 11 | public function createRules(array $input): array; 12 | 13 | /** 14 | * @param array $input 15 | * @return array 16 | */ 17 | public function data(array $input): array; 18 | 19 | /** 20 | * @param array $input 21 | */ 22 | public function createServices(array $input): void; 23 | 24 | public function install(): void; 25 | } 26 | -------------------------------------------------------------------------------- /app/StorageProviders/AbstractStorageProvider.php: -------------------------------------------------------------------------------- 1 | 'required', 14 | ]; 15 | } 16 | 17 | public function credentialData(array $input): array 18 | { 19 | return [ 20 | 'path' => $input['path'], 21 | ]; 22 | } 23 | 24 | public function connect(): bool 25 | { 26 | return true; 27 | } 28 | 29 | public function ssh(Server $server): Storage 30 | { 31 | return new \App\SSH\Storage\Local($server, $this->storageProvider); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /app/StorageProviders/StorageProvider.php: -------------------------------------------------------------------------------- 1 | 12 | */ 13 | public function validationRules(): array; 14 | 15 | /** 16 | * @param array $input 17 | * @return array 18 | */ 19 | public function credentialData(array $input): array; 20 | 21 | public function connect(): bool; 22 | 23 | public function ssh(Server $server): Storage; 24 | } 25 | -------------------------------------------------------------------------------- /app/Traits/Enum.php: -------------------------------------------------------------------------------- 1 | 9 | */ 10 | public static function all(): array 11 | { 12 | $reflection = new \ReflectionClass(self::class); 13 | 14 | return $reflection->getConstants(); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /app/Traits/HasProjectThroughServer.php: -------------------------------------------------------------------------------- 1 | 13 | */ 14 | public function project(): HasOneThrough 15 | { 16 | return $this->hasOneThrough( 17 | Project::class, 18 | Server::class, 19 | 'id', 20 | 'id', 21 | 'server_id', 22 | 'project_id' 23 | ); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /app/ValidationRules/CronRule.php: -------------------------------------------------------------------------------- 1 | acceptCustom && $value === 'custom') { 18 | return; 19 | } 20 | $fail('Invalid frequency')->translate(); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /app/ValidationRules/DomainRule.php: -------------------------------------------------------------------------------- 1 | translate(); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /app/ValidationRules/RestrictedIPAddressesRule.php: -------------------------------------------------------------------------------- 1 | translate(); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /app/ValidationRules/SshKeyRule.php: -------------------------------------------------------------------------------- 1 | translate(); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /app/Web/Components/Link.php: -------------------------------------------------------------------------------- 1 | render()->with([ 21 | 'href' => $this->href, 22 | 'text' => $this->text, 23 | 'external' => $this->external, 24 | ]); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/Web/Contracts/HasSecondSubNav.php: -------------------------------------------------------------------------------- 1 | 9 | */ 10 | public function getSecondSubNavigation(): array; 11 | } 12 | -------------------------------------------------------------------------------- /app/Web/Fields/CodeEditorField.php: -------------------------------------------------------------------------------- 1 | 17 | */ 18 | public function getOptions(): array 19 | { 20 | return [ 21 | 'id' => $this->getId(), 22 | 'name' => $this->getName(), 23 | 'lang' => $this->lang, 24 | 'value' => json_encode($this->getState() ?? ''), 25 | ]; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /app/Web/Fields/ProviderField.php: -------------------------------------------------------------------------------- 1 | $this->server, 17 | ]); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /app/Web/Pages/Servers/FileManager/Index.php: -------------------------------------------------------------------------------- 1 | 15 | */ 16 | protected $listeners = ['$refresh']; 17 | 18 | public function mount(): void 19 | { 20 | $this->authorize('manage', $this->server); 21 | } 22 | 23 | public function getWidgets(): array 24 | { 25 | return [ 26 | [Widgets\FilesList::class, ['server' => $this->server]], 27 | ]; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /app/Web/Pages/Servers/Sites/Pages/Workers/Widgets/WorkersList.php: -------------------------------------------------------------------------------- 1 | 10 | */ 11 | class BackupFactory extends Factory 12 | { 13 | public function definition(): array 14 | { 15 | return [ 16 | 'type' => 'database', 17 | 'interval' => '0 * * * *', 18 | 'keep_backups' => 10, 19 | 'status' => BackupStatus::RUNNING, 20 | ]; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /database/factories/BackupFileFactory.php: -------------------------------------------------------------------------------- 1 | 9 | */ 10 | class BackupFileFactory extends Factory 11 | { 12 | public function definition(): array 13 | { 14 | return [ 15 | // 16 | ]; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /database/factories/CommandFactory.php: -------------------------------------------------------------------------------- 1 | 12 | */ 13 | class CommandFactory extends Factory 14 | { 15 | protected $model = Command::class; 16 | 17 | public function definition(): array 18 | { 19 | return [ 20 | 'name' => $this->faker->words(3, true), 21 | 'command' => 'php artisan '.$this->faker->word, 22 | 'created_at' => Carbon::now(), 23 | 'updated_at' => Carbon::now(), 24 | 'site_id' => Site::factory(), 25 | ]; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /database/factories/CronJobFactory.php: -------------------------------------------------------------------------------- 1 | 11 | */ 12 | class CronJobFactory extends Factory 13 | { 14 | protected $model = CronJob::class; 15 | 16 | public function definition(): array 17 | { 18 | return [ 19 | 'command' => 'ls -la', 20 | 'user' => 'root', 21 | 'frequency' => '* * * * *', 22 | 'hidden' => false, 23 | 'status' => CronjobStatus::READY, 24 | ]; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /database/factories/DatabaseFactory.php: -------------------------------------------------------------------------------- 1 | 11 | */ 12 | class DatabaseFactory extends Factory 13 | { 14 | protected $model = Database::class; 15 | 16 | public function definition(): array 17 | { 18 | return [ 19 | 'name' => $this->faker->userName, 20 | 'status' => DatabaseStatus::READY, 21 | ]; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /database/factories/DatabaseUserFactory.php: -------------------------------------------------------------------------------- 1 | 10 | */ 11 | class DatabaseUserFactory extends Factory 12 | { 13 | protected $model = DatabaseUser::class; 14 | 15 | public function definition(): array 16 | { 17 | return [ 18 | 'username' => $this->faker->userName, 19 | 'password' => 'password', 20 | 'databases' => [], 21 | 'host' => '%', 22 | ]; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /database/factories/DeploymentFactory.php: -------------------------------------------------------------------------------- 1 | 10 | */ 11 | class DeploymentFactory extends Factory 12 | { 13 | protected $model = Deployment::class; 14 | 15 | public function definition(): array 16 | { 17 | return [ 18 | // 19 | ]; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /database/factories/DeploymentScriptFactory.php: -------------------------------------------------------------------------------- 1 | 12 | */ 13 | class DeploymentScriptFactory extends Factory 14 | { 15 | protected $model = DeploymentScript::class; 16 | 17 | public function definition(): array 18 | { 19 | return [ 20 | 'name' => $this->faker->name(), 21 | 'content' => $this->faker->word(), 22 | 'created_at' => Carbon::now(), 23 | 'updated_at' => Carbon::now(), 24 | 'site_id' => Site::factory(), 25 | ]; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /database/factories/FirewallRuleFactory.php: -------------------------------------------------------------------------------- 1 | 10 | */ 11 | class FirewallRuleFactory extends Factory 12 | { 13 | protected $model = FirewallRule::class; 14 | 15 | public function definition(): array 16 | { 17 | return [ 18 | 'name' => $this->faker->word, 19 | 'type' => 'allow', 20 | 'protocol' => 'tcp', 21 | 'port' => $this->faker->numberBetween(1, 65535), 22 | 'source' => $this->faker->ipv4(), 23 | 'mask' => 24, 24 | 'note' => 'test', 25 | ]; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /database/factories/NotificationChannelFactory.php: -------------------------------------------------------------------------------- 1 | 9 | */ 10 | class NotificationChannelFactory extends Factory 11 | { 12 | public function definition(): array 13 | { 14 | return [ 15 | 'label' => $this->faker->text(10), 16 | 'provider' => 'email', 17 | 'data' => [ 18 | 'email' => $this->faker->email, 19 | ], 20 | 'connected' => 1, 21 | ]; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /database/factories/ProjectFactory.php: -------------------------------------------------------------------------------- 1 | 11 | */ 12 | class ProjectFactory extends Factory 13 | { 14 | protected $model = Project::class; 15 | 16 | public function definition(): array 17 | { 18 | return [ 19 | 'name' => $this->faker->name(), 20 | 'created_at' => Carbon::now(), 21 | 'updated_at' => Carbon::now(), 22 | ]; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /database/factories/RedirectFactory.php: -------------------------------------------------------------------------------- 1 | 11 | */ 12 | class RedirectFactory extends Factory 13 | { 14 | protected $model = Redirect::class; 15 | 16 | /** 17 | * @return array 18 | */ 19 | public function definition(): array 20 | { 21 | return [ 22 | 'from' => $this->faker->word, 23 | 'to' => $this->faker->url, 24 | 'mode' => $this->faker->randomElement([301, 302, 307, 308]), 25 | 'status' => RedirectStatus::READY, 26 | ]; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /database/factories/ScriptExecutionFactory.php: -------------------------------------------------------------------------------- 1 | 12 | */ 13 | class ScriptExecutionFactory extends Factory 14 | { 15 | protected $model = ScriptExecution::class; 16 | 17 | public function definition(): array 18 | { 19 | return [ 20 | 'user' => 'root', 21 | 'variables' => [], 22 | 'status' => ScriptExecutionStatus::EXECUTING, 23 | 'created_at' => Carbon::now(), 24 | 'updated_at' => Carbon::now(), 25 | ]; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /database/factories/ScriptFactory.php: -------------------------------------------------------------------------------- 1 | 11 | */ 12 | class ScriptFactory extends Factory 13 | { 14 | protected $model = Script::class; 15 | 16 | public function definition(): array 17 | { 18 | return [ 19 | 'name' => $this->faker->name(), 20 | 'content' => 'ls -la', 21 | 'created_at' => Carbon::now(), 22 | 'updated_at' => Carbon::now(), 23 | ]; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /database/factories/ServerLogFactory.php: -------------------------------------------------------------------------------- 1 | 10 | */ 11 | class ServerLogFactory extends Factory 12 | { 13 | protected $model = ServerLog::class; 14 | 15 | public function definition(): array 16 | { 17 | return [ 18 | 'type' => 'test-log', 19 | 'name' => 'test.log', 20 | 'disk' => 'server-logs', 21 | ]; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /database/factories/ServerProviderFactory.php: -------------------------------------------------------------------------------- 1 | 11 | */ 12 | class ServerProviderFactory extends Factory 13 | { 14 | protected $model = ServerProvider::class; 15 | 16 | public function definition(): array 17 | { 18 | return [ 19 | 'profile' => $this->faker->word(), 20 | 'provider' => $this->faker->randomElement(config('core.server_providers')), 21 | 'credentials' => [], 22 | 'connected' => 1, 23 | 'user_id' => User::factory(), 24 | ]; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /database/factories/ServiceFactory.php: -------------------------------------------------------------------------------- 1 | 10 | */ 11 | class ServiceFactory extends Factory 12 | { 13 | protected $model = Service::class; 14 | 15 | public function definition(): array 16 | { 17 | return [ 18 | ]; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /database/factories/SiteFactory.php: -------------------------------------------------------------------------------- 1 | 11 | */ 12 | class SiteFactory extends Factory 13 | { 14 | protected $model = Site::class; 15 | 16 | public function definition(): array 17 | { 18 | return [ 19 | 'type' => SiteType::LARAVEL, 20 | 'domain' => 'test.com', 21 | 'web_directory' => '/', 22 | 'path' => '/home', 23 | 'status' => 'ready', 24 | 'progress' => '100', 25 | 'php_version' => '8.2', 26 | 'branch' => 'main', 27 | 'user' => 'vito', 28 | ]; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /database/factories/SshKeyFactory.php: -------------------------------------------------------------------------------- 1 | 10 | */ 11 | class SshKeyFactory extends Factory 12 | { 13 | protected $model = SshKey::class; 14 | 15 | public function definition(): array 16 | { 17 | return [ 18 | 'name' => $this->faker->name(), 19 | 'public_key' => 'public-key-content', 20 | ]; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /database/factories/StorageProviderFactory.php: -------------------------------------------------------------------------------- 1 | 10 | */ 11 | class StorageProviderFactory extends Factory 12 | { 13 | public function definition(): array 14 | { 15 | return [ 16 | 'profile' => $this->faker->word(), 17 | 'provider' => $this->faker->randomElement(config('core.storage_providers')), 18 | 'credentials' => [ 19 | 'token' => 'test-token', 20 | ], 21 | 'user_id' => User::factory(), 22 | ]; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /database/factories/TagFactory.php: -------------------------------------------------------------------------------- 1 | 11 | */ 12 | class TagFactory extends Factory 13 | { 14 | protected $model = Tag::class; 15 | 16 | public function definition(): array 17 | { 18 | return [ 19 | 'project_id' => 1, 20 | 'created_at' => Carbon::now(), // 21 | 'updated_at' => Carbon::now(), 22 | 'name' => $this->faker->randomElement(['production', 'staging', 'development']), 23 | 'color' => $this->faker->randomElement(config('core.tag_colors')), 24 | ]; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /database/factories/WorkerFactory.php: -------------------------------------------------------------------------------- 1 | 11 | */ 12 | class WorkerFactory extends Factory 13 | { 14 | protected $model = Worker::class; 15 | 16 | public function definition(): array 17 | { 18 | return [ 19 | 'command' => 'php artisan queue:work', 20 | 'user' => 'vito', 21 | 'auto_start' => 1, 22 | 'auto_restart' => 1, 23 | 'numprocs' => 1, 24 | 'redirect_stderr' => 1, 25 | 'stdout_logfile' => 'file.log', 26 | 'status' => WorkerStatus::CREATING, 27 | ]; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /database/migrations/2014_10_12_100000_create_password_resets_table.php: -------------------------------------------------------------------------------- 1 | string('email')->index(); 13 | $table->string('token'); 14 | $table->timestamp('created_at')->nullable(); 15 | }); 16 | } 17 | 18 | public function down(): void 19 | { 20 | Schema::dropIfExists('password_reset_tokens'); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /database/migrations/2021_06_28_085814_create_source_controls_table.php: -------------------------------------------------------------------------------- 1 | id(); 13 | $table->string('provider'); 14 | $table->json('provider_data')->nullable(); 15 | $table->longText('access_token')->nullable(); 16 | $table->timestamps(); 17 | }); 18 | } 19 | 20 | public function down(): void 21 | { 22 | Schema::dropIfExists('source_controls'); 23 | } 24 | }; 25 | -------------------------------------------------------------------------------- /database/migrations/2021_07_03_133319_create_databases_table.php: -------------------------------------------------------------------------------- 1 | id(); 14 | $table->unsignedBigInteger('server_id'); 15 | $table->string('name'); 16 | $table->string('status')->default(DatabaseStatus::CREATING); 17 | $table->timestamps(); 18 | }); 19 | } 20 | 21 | public function down(): void 22 | { 23 | Schema::dropIfExists('databases'); 24 | } 25 | }; 26 | -------------------------------------------------------------------------------- /database/migrations/2021_08_13_213657_create_deployment_scripts_table.php: -------------------------------------------------------------------------------- 1 | id(); 13 | $table->unsignedBigInteger('site_id'); 14 | $table->string('name')->nullable(); 15 | $table->longText('content')->nullable(); 16 | $table->timestamps(); 17 | }); 18 | } 19 | 20 | public function down(): void 21 | { 22 | Schema::dropIfExists('deployment_scripts'); 23 | } 24 | }; 25 | -------------------------------------------------------------------------------- /database/migrations/2021_08_29_210204_create_ssh_keys_table.php: -------------------------------------------------------------------------------- 1 | id(); 13 | $table->unsignedBigInteger('user_id'); 14 | $table->string('name'); 15 | $table->longText('public_key'); 16 | $table->timestamps(); 17 | }); 18 | } 19 | 20 | public function down(): void 21 | { 22 | Schema::dropIfExists('ssh_keys'); 23 | } 24 | }; 25 | -------------------------------------------------------------------------------- /database/migrations/2021_08_30_174511_create_server_ssh_keys_table.php: -------------------------------------------------------------------------------- 1 | id(); 13 | $table->unsignedBigInteger('server_id'); 14 | $table->unsignedBigInteger('ssh_key_id'); 15 | $table->string('status'); 16 | $table->timestamps(); 17 | }); 18 | } 19 | 20 | public function down(): void 21 | { 22 | Schema::dropIfExists('server_ssh_keys'); 23 | } 24 | }; 25 | -------------------------------------------------------------------------------- /database/migrations/2021_12_09_062430_create_scripts_table.php: -------------------------------------------------------------------------------- 1 | id(); 13 | $table->unsignedBigInteger('user_id'); 14 | $table->string('name'); 15 | $table->longText('content'); 16 | $table->timestamps(); 17 | }); 18 | } 19 | 20 | public function down(): void 21 | { 22 | Schema::dropIfExists('scripts'); 23 | } 24 | }; 25 | -------------------------------------------------------------------------------- /database/migrations/2023_07_21_210213_update_firewall_rules_table.php: -------------------------------------------------------------------------------- 1 | longText('ssh_key')->nullable()->after('repository'); 13 | }); 14 | } 15 | 16 | public function down(): void 17 | { 18 | Schema::table('sites', function (Blueprint $table): void { 19 | $table->dropColumn('ssh_key'); 20 | }); 21 | } 22 | }; 23 | -------------------------------------------------------------------------------- /database/migrations/2023_07_30_163805_add_url_to_source_controls_table.php: -------------------------------------------------------------------------------- 1 | string('url')->nullable()->after('provider'); 13 | }); 14 | } 15 | 16 | public function down(): void 17 | { 18 | Schema::table('source_controls', function (Blueprint $table): void { 19 | $table->dropColumn('url'); 20 | }); 21 | } 22 | }; 23 | -------------------------------------------------------------------------------- /database/migrations/2023_07_30_200348_add_profile_to_source_controls_table.php: -------------------------------------------------------------------------------- 1 | string('profile')->after('provider')->nullable(); 13 | }); 14 | } 15 | 16 | public function down(): void 17 | { 18 | Schema::table('source_controls', function (Blueprint $table): void { 19 | $table->dropColumn('profile'); 20 | }); 21 | } 22 | }; 23 | -------------------------------------------------------------------------------- /database/migrations/2023_07_30_205328_add_source_control_id_to_sites_table.php: -------------------------------------------------------------------------------- 1 | unsignedBigInteger('source_control_id')->nullable()->after('source_control'); 13 | }); 14 | } 15 | 16 | public function down(): void 17 | { 18 | Schema::table('sites', function (Blueprint $table): void { 19 | $table->dropColumn('source_control_id'); 20 | }); 21 | } 22 | }; 23 | -------------------------------------------------------------------------------- /database/migrations/2023_08_17_231824_update_backups_table.php: -------------------------------------------------------------------------------- 1 | dropColumn('name'); 13 | }); 14 | } 15 | 16 | public function down(): void 17 | { 18 | Schema::table('backups', function (Blueprint $table): void { 19 | $table->string('name')->nullable(); 20 | }); 21 | } 22 | }; 23 | -------------------------------------------------------------------------------- /database/migrations/2023_08_25_183201_update_backup_files_table.php: -------------------------------------------------------------------------------- 1 | string('restored_to')->after('status')->nullable(); 13 | }); 14 | } 15 | 16 | public function down(): void 17 | { 18 | Schema::table('backup_files', function (Blueprint $table): void { 19 | $table->dropColumn('restored_to'); 20 | }); 21 | } 22 | }; 23 | -------------------------------------------------------------------------------- /database/migrations/2023_10_01_120250_create_projects_table.php: -------------------------------------------------------------------------------- 1 | id(); 13 | $table->bigInteger('user_id'); 14 | $table->string('name'); 15 | $table->timestamps(); 16 | }); 17 | } 18 | 19 | public function down(): void 20 | { 21 | Schema::dropIfExists('projects'); 22 | } 23 | }; 24 | -------------------------------------------------------------------------------- /database/migrations/2024_01_01_232932_update_servers_table.php: -------------------------------------------------------------------------------- 1 | unsignedBigInteger('project_id')->nullable()->after('id'); 13 | }); 14 | } 15 | 16 | public function down(): void 17 | { 18 | Schema::table('servers', function (Blueprint $table): void { 19 | $table->dropColumn('project_id'); 20 | }); 21 | } 22 | }; 23 | -------------------------------------------------------------------------------- /database/migrations/2024_06_24_211155_add_project_id_to_notification_channels_table.php: -------------------------------------------------------------------------------- 1 | unsignedBigInteger('project_id')->nullable(); 13 | }); 14 | } 15 | 16 | public function down(): void 17 | { 18 | Schema::table('notification_channels', function (Blueprint $table): void { 19 | $table->dropColumn('project_id'); 20 | }); 21 | } 22 | }; 23 | -------------------------------------------------------------------------------- /database/migrations/2024_06_25_202655_add_project_id_to_storage_providers_table.php: -------------------------------------------------------------------------------- 1 | unsignedBigInteger('project_id')->nullable(); 13 | }); 14 | } 15 | 16 | public function down(): void 17 | { 18 | Schema::table('storage_providers', function (Blueprint $table): void { 19 | $table->dropColumn('project_id'); 20 | }); 21 | } 22 | }; 23 | -------------------------------------------------------------------------------- /database/migrations/2024_06_25_212812_add_project_id_to_server_providers_table.php: -------------------------------------------------------------------------------- 1 | unsignedBigInteger('project_id')->nullable(); 13 | }); 14 | } 15 | 16 | public function down(): void 17 | { 18 | Schema::table('server_providers', function (Blueprint $table): void { 19 | $table->dropColumn('project_id'); 20 | }); 21 | } 22 | }; 23 | -------------------------------------------------------------------------------- /database/migrations/2024_08_09_180021_create_tags_table.php: -------------------------------------------------------------------------------- 1 | id(); 13 | $table->unsignedBigInteger('project_id'); 14 | $table->string('name'); 15 | $table->string('color'); 16 | $table->timestamps(); 17 | }); 18 | } 19 | 20 | public function down(): void 21 | { 22 | Schema::dropIfExists('tags'); 23 | } 24 | }; 25 | -------------------------------------------------------------------------------- /database/migrations/2024_08_09_181239_create_taggables_table.php: -------------------------------------------------------------------------------- 1 | id(); 13 | $table->unsignedBigInteger('tag_id'); 14 | $table->unsignedBigInteger('taggable_id'); 15 | $table->string('taggable_type'); 16 | $table->timestamps(); 17 | }); 18 | } 19 | 20 | public function down(): void 21 | { 22 | Schema::dropIfExists('taggables'); 23 | } 24 | }; 25 | -------------------------------------------------------------------------------- /database/migrations/2024_10_04_190341_add_soft_deletes_to_databases.php: -------------------------------------------------------------------------------- 1 | softDeletes(); 13 | }); 14 | } 15 | 16 | public function down(): void 17 | { 18 | Schema::table('databases', function (Blueprint $table): void { 19 | $table->dropSoftDeletes(); 20 | }); 21 | } 22 | }; 23 | -------------------------------------------------------------------------------- /database/migrations/2024_10_05_094650_add_soft_deletes_to_source_controls.php: -------------------------------------------------------------------------------- 1 | softDeletes(); 13 | }); 14 | } 15 | 16 | public function down(): void 17 | { 18 | Schema::table('source_controls', function (Blueprint $table): void { 19 | $table->dropSoftDeletes(); 20 | }); 21 | } 22 | }; 23 | -------------------------------------------------------------------------------- /database/migrations/2024_10_06_091631_add_log_id_to_ssls.php: -------------------------------------------------------------------------------- 1 | unsignedInteger('log_id')->nullable(); 13 | }); 14 | } 15 | 16 | public function down(): void 17 | { 18 | Schema::table('ssls', function (Blueprint $table): void { 19 | $table->dropColumn('log_id'); 20 | }); 21 | } 22 | }; 23 | -------------------------------------------------------------------------------- /database/migrations/2024_10_06_160213_add_soft_deletes_to_ssh_keys.php: -------------------------------------------------------------------------------- 1 | softDeletes(); 13 | }); 14 | } 15 | 16 | public function down(): void 17 | { 18 | Schema::table('ssh_keys', function (Blueprint $table): void { 19 | $table->dropSoftDeletes(); 20 | }); 21 | } 22 | }; 23 | -------------------------------------------------------------------------------- /database/migrations/2024_10_06_162253_add_project_id_to_scripts.php: -------------------------------------------------------------------------------- 1 | unsignedInteger('project_id')->nullable(); 13 | }); 14 | } 15 | 16 | public function down(): void 17 | { 18 | Schema::table('scripts', function (Blueprint $table): void { 19 | $table->dropColumn('project_id'); 20 | }); 21 | } 22 | }; 23 | -------------------------------------------------------------------------------- /database/migrations/2024_10_06_174115_add_server_id_to_script_executions.php: -------------------------------------------------------------------------------- 1 | unsignedInteger('server_id')->nullable(); 13 | }); 14 | } 15 | 16 | public function down(): void 17 | { 18 | Schema::table('script_executions', function (Blueprint $table): void { 19 | $table->dropColumn('server_id'); 20 | }); 21 | } 22 | }; 23 | -------------------------------------------------------------------------------- /database/migrations/2025_01_12_173141_add_user_to_sites.php: -------------------------------------------------------------------------------- 1 | string('user')->default(config('core.ssh_user')); 16 | }); 17 | } 18 | 19 | /** 20 | * Reverse the migrations. 21 | */ 22 | public function down(): void 23 | { 24 | Schema::table('sites', function (Blueprint $table): void { 25 | $table->dropColumn('user'); 26 | }); 27 | } 28 | }; 29 | -------------------------------------------------------------------------------- /database/migrations/2025_01_25_193815_drop_telescope_tables.php: -------------------------------------------------------------------------------- 1 | getConnection()); 11 | 12 | $schema->dropIfExists('telescope_entries_tags'); 13 | $schema->dropIfExists('telescope_entries'); 14 | $schema->dropIfExists('telescope_monitoring'); 15 | } 16 | 17 | public function down(): void 18 | { 19 | // 20 | } 21 | }; 22 | -------------------------------------------------------------------------------- /database/migrations/2025_01_27_181512_add_force_ssl_to_sites_table.php: -------------------------------------------------------------------------------- 1 | boolean('force_ssl')->default(false); 13 | }); 14 | } 15 | 16 | public function down(): void 17 | { 18 | Schema::table('sites', function (Blueprint $table): void { 19 | $table->dropColumn('force_ssl'); 20 | }); 21 | } 22 | }; 23 | -------------------------------------------------------------------------------- /database/migrations/2025_01_29_192733_add_email_to_ssls_table.php: -------------------------------------------------------------------------------- 1 | string('email')->nullable(); 13 | }); 14 | } 15 | 16 | public function down(): void 17 | { 18 | Schema::table('ssls', function (Blueprint $table): void { 19 | $table->dropColumn('email'); 20 | }); 21 | } 22 | }; 23 | -------------------------------------------------------------------------------- /database/migrations/2025_03_16_081225_rename_queues_to_workers.php: -------------------------------------------------------------------------------- 1 | unsignedInteger('site_id')->nullable()->change(); 14 | }); 15 | } 16 | 17 | public function down(): void 18 | { 19 | Schema::rename('workers', 'queues'); 20 | } 21 | }; 22 | -------------------------------------------------------------------------------- /database/seeders/CronJobsSeeder.php: -------------------------------------------------------------------------------- 1 | create([ 17 | 'server_id' => $server->id, 18 | 'command' => 'php /home/vito/'.$server->project->name.'.com/artisan schedule:run', 19 | ]); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /database/seeders/ProjectsSeeder.php: -------------------------------------------------------------------------------- 1 | create([ 13 | 'name' => 'vitodeploy', 14 | ]); 15 | Project::query()->create([ 16 | 'name' => 'laravel', 17 | ]); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /database/seeders/SshKeysSeeder.php: -------------------------------------------------------------------------------- 1 | create([ 18 | 'user_id' => $server->user_id, 19 | 'name' => 'id_rsa', 20 | 'public_key' => 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDZ', 21 | ]); 22 | $server->sshKeys()->attach($sshKey, [ 23 | 'status' => SshKeyStatus::ADDED, 24 | ]); 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /database/seeders/TagsSeeder.php: -------------------------------------------------------------------------------- 1 | tags()->create([ 16 | 'name' => 'production', 17 | 'color' => 'red', 18 | ]); 19 | $project->tags()->create([ 20 | 'name' => 'staging', 21 | 'color' => 'yellow', 22 | ]); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /database/seeders/UsersSeeder.php: -------------------------------------------------------------------------------- 1 | create([ 14 | 'name' => 'Demo User', 15 | 'email' => 'demo@vitodeploy.com', 16 | 'current_project_id' => Project::query()->first()->id, 17 | ]); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /docker/docker-compose.yml: -------------------------------------------------------------------------------- 1 | services: 2 | vito: 3 | build: 4 | context: ../ 5 | dockerfile: docker/Dockerfile 6 | environment: 7 | NAME: "vito" 8 | EMAIL: "vito@example.com" 9 | PASSWORD: "password" 10 | APP_KEY: "base64:UodiJrx3DkcMlizmoimNlDn+yd4q5f2VbkBay19rJwM=" 11 | APP_PORT: 8000 12 | extra_hosts: 13 | - 'host.docker.internal:host-gateway' 14 | ports: 15 | - '${APP_PORT:-80}:80' 16 | - '${VITE_PORT:-5173}:${VITE_PORT:-5173}' 17 | volumes: 18 | - "vito-storage:/var/www/html/storage" 19 | volumes: 20 | vito-storage: 21 | driver: local 22 | -------------------------------------------------------------------------------- /docker/nginx.conf: -------------------------------------------------------------------------------- 1 | server { 2 | listen 80; 3 | listen [::]:80; 4 | server_name _; 5 | root /var/www/html/public; 6 | 7 | add_header X-Frame-Options "SAMEORIGIN"; 8 | add_header X-Content-Type-Options "nosniff"; 9 | 10 | index index.php; 11 | 12 | charset utf-8; 13 | 14 | location / { 15 | try_files $uri $uri/ /index.php?$query_string; 16 | } 17 | 18 | location ~ \.php$ { 19 | include snippets/fastcgi-php.conf; 20 | fastcgi_pass unix:/var/run/php/php8.2-fpm.sock; 21 | fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 22 | include fastcgi_params; 23 | } 24 | 25 | location ~ /\.(?!well-known).* { 26 | deny all; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /docker/php.ini: -------------------------------------------------------------------------------- 1 | [PHP] 2 | post_max_size = 100M 3 | upload_max_filesize = 100M 4 | -------------------------------------------------------------------------------- /docker/supervisord.conf: -------------------------------------------------------------------------------- 1 | [supervisord] 2 | nodaemon=true 3 | user=root 4 | logfile=/var/log/supervisor/supervisord.log 5 | pidfile=/var/run/supervisord.pid 6 | redirect_stderr=true 7 | 8 | [program:worker] 9 | user=root 10 | autostart=1 11 | autorestart=1 12 | numprocs=1 13 | command=/usr/bin/php /var/www/html/artisan queue:work --sleep=3 --backoff=0 --queue=default,ssh,ssh-long --timeout=3600 --tries=1 14 | redirect_stderr=true 15 | stdout_logfile=/var/www/html/storage/logs/worker.log 16 | stopwaitsecs=3600 17 | -------------------------------------------------------------------------------- /lang/en.json: -------------------------------------------------------------------------------- 1 | { 2 | "servers.create.public_key_text": "mkdir -p /root/.ssh && touch /root/.ssh/authorized_keys && echo ':public_key' >> /root/.ssh/authorized_keys", 3 | "servers.create.public_key_warning": "Your server needs to have a new unused installation of supported operating systems and must have a root user. To get started, add our public key to /root/.ssh/authorized_keys file by running the bellow command on your server as root.", 4 | "server_providers.plan": ":name - :cpu Cores - :memory Memory - :disk Disk" 5 | } 6 | -------------------------------------------------------------------------------- /phpstan.neon: -------------------------------------------------------------------------------- 1 | includes: 2 | - vendor/larastan/larastan/extension.neon 3 | - vendor/nesbot/carbon/extension.neon 4 | parameters: 5 | paths: 6 | - app 7 | - config 8 | - bootstrap 9 | - database/factories 10 | level: 7 11 | -------------------------------------------------------------------------------- /pint.json: -------------------------------------------------------------------------------- 1 | { 2 | "preset": "laravel", 3 | "exclude": ["resources/views/ssh"] 4 | } 5 | -------------------------------------------------------------------------------- /postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | }; 7 | -------------------------------------------------------------------------------- /public/.htaccess: -------------------------------------------------------------------------------- 1 | 2 | 3 | Options -MultiViews -Indexes 4 | 5 | 6 | RewriteEngine On 7 | 8 | # Handle Authorization Header 9 | RewriteCond %{HTTP:Authorization} . 10 | RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] 11 | 12 | # Redirect Trailing Slashes If Not A Folder... 13 | RewriteCond %{REQUEST_FILENAME} !-d 14 | RewriteCond %{REQUEST_URI} (.+)/$ 15 | RewriteRule ^ %1 [L,R=301] 16 | 17 | # Send Requests To Front Controller... 18 | RewriteCond %{REQUEST_FILENAME} !-d 19 | RewriteCond %{REQUEST_FILENAME} !-f 20 | RewriteRule ^ index.php [L] 21 | 22 | -------------------------------------------------------------------------------- /public/api-docs/images/navbar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vitodeploy/vito/2318e1b1dff509df925b3fbf904af46030228fe7/public/api-docs/images/navbar.png -------------------------------------------------------------------------------- /public/build/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "resources/css/filament/app/theme.css": { 3 | "file": "assets/theme-f92da083.css", 4 | "isEntry": true, 5 | "src": "resources/css/filament/app/theme.css" 6 | }, 7 | "resources/js/app.js": { 8 | "file": "assets/app-58d76f18.js", 9 | "isEntry": true, 10 | "src": "resources/js/app.js" 11 | } 12 | } -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vitodeploy/vito/2318e1b1dff509df925b3fbf904af46030228fe7/public/favicon.ico -------------------------------------------------------------------------------- /public/favicon/android-icon-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vitodeploy/vito/2318e1b1dff509df925b3fbf904af46030228fe7/public/favicon/android-icon-144x144.png -------------------------------------------------------------------------------- /public/favicon/android-icon-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vitodeploy/vito/2318e1b1dff509df925b3fbf904af46030228fe7/public/favicon/android-icon-192x192.png -------------------------------------------------------------------------------- /public/favicon/android-icon-36x36.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vitodeploy/vito/2318e1b1dff509df925b3fbf904af46030228fe7/public/favicon/android-icon-36x36.png -------------------------------------------------------------------------------- /public/favicon/android-icon-48x48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vitodeploy/vito/2318e1b1dff509df925b3fbf904af46030228fe7/public/favicon/android-icon-48x48.png -------------------------------------------------------------------------------- /public/favicon/android-icon-72x72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vitodeploy/vito/2318e1b1dff509df925b3fbf904af46030228fe7/public/favicon/android-icon-72x72.png -------------------------------------------------------------------------------- /public/favicon/android-icon-96x96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vitodeploy/vito/2318e1b1dff509df925b3fbf904af46030228fe7/public/favicon/android-icon-96x96.png -------------------------------------------------------------------------------- /public/favicon/apple-icon-114x114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vitodeploy/vito/2318e1b1dff509df925b3fbf904af46030228fe7/public/favicon/apple-icon-114x114.png -------------------------------------------------------------------------------- /public/favicon/apple-icon-120x120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vitodeploy/vito/2318e1b1dff509df925b3fbf904af46030228fe7/public/favicon/apple-icon-120x120.png -------------------------------------------------------------------------------- /public/favicon/apple-icon-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vitodeploy/vito/2318e1b1dff509df925b3fbf904af46030228fe7/public/favicon/apple-icon-144x144.png -------------------------------------------------------------------------------- /public/favicon/apple-icon-152x152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vitodeploy/vito/2318e1b1dff509df925b3fbf904af46030228fe7/public/favicon/apple-icon-152x152.png -------------------------------------------------------------------------------- /public/favicon/apple-icon-180x180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vitodeploy/vito/2318e1b1dff509df925b3fbf904af46030228fe7/public/favicon/apple-icon-180x180.png -------------------------------------------------------------------------------- /public/favicon/apple-icon-57x57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vitodeploy/vito/2318e1b1dff509df925b3fbf904af46030228fe7/public/favicon/apple-icon-57x57.png -------------------------------------------------------------------------------- /public/favicon/apple-icon-60x60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vitodeploy/vito/2318e1b1dff509df925b3fbf904af46030228fe7/public/favicon/apple-icon-60x60.png -------------------------------------------------------------------------------- /public/favicon/apple-icon-72x72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vitodeploy/vito/2318e1b1dff509df925b3fbf904af46030228fe7/public/favicon/apple-icon-72x72.png -------------------------------------------------------------------------------- /public/favicon/apple-icon-76x76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vitodeploy/vito/2318e1b1dff509df925b3fbf904af46030228fe7/public/favicon/apple-icon-76x76.png -------------------------------------------------------------------------------- /public/favicon/apple-icon-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vitodeploy/vito/2318e1b1dff509df925b3fbf904af46030228fe7/public/favicon/apple-icon-precomposed.png -------------------------------------------------------------------------------- /public/favicon/apple-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vitodeploy/vito/2318e1b1dff509df925b3fbf904af46030228fe7/public/favicon/apple-icon.png -------------------------------------------------------------------------------- /public/favicon/browserconfig.xml: -------------------------------------------------------------------------------- 1 | 2 | #ffffff -------------------------------------------------------------------------------- /public/favicon/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vitodeploy/vito/2318e1b1dff509df925b3fbf904af46030228fe7/public/favicon/favicon-16x16.png -------------------------------------------------------------------------------- /public/favicon/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vitodeploy/vito/2318e1b1dff509df925b3fbf904af46030228fe7/public/favicon/favicon-32x32.png -------------------------------------------------------------------------------- /public/favicon/favicon-96x96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vitodeploy/vito/2318e1b1dff509df925b3fbf904af46030228fe7/public/favicon/favicon-96x96.png -------------------------------------------------------------------------------- /public/favicon/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vitodeploy/vito/2318e1b1dff509df925b3fbf904af46030228fe7/public/favicon/favicon.ico -------------------------------------------------------------------------------- /public/favicon/ms-icon-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vitodeploy/vito/2318e1b1dff509df925b3fbf904af46030228fe7/public/favicon/ms-icon-144x144.png -------------------------------------------------------------------------------- /public/favicon/ms-icon-150x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vitodeploy/vito/2318e1b1dff509df925b3fbf904af46030228fe7/public/favicon/ms-icon-150x150.png -------------------------------------------------------------------------------- /public/favicon/ms-icon-310x310.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vitodeploy/vito/2318e1b1dff509df925b3fbf904af46030228fe7/public/favicon/ms-icon-310x310.png -------------------------------------------------------------------------------- /public/favicon/ms-icon-70x70.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vitodeploy/vito/2318e1b1dff509df925b3fbf904af46030228fe7/public/favicon/ms-icon-70x70.png -------------------------------------------------------------------------------- /public/js/filament/forms/components/textarea.js: -------------------------------------------------------------------------------- 1 | function r({initialHeight:t,shouldAutosize:i,state:s}){return{state:s,wrapperEl:null,init:function(){this.wrapperEl=this.$el.parentNode,this.setInitialHeight(),i?this.$watch("state",()=>{this.resize()}):this.setUpResizeObserver()},setInitialHeight:function(){this.$el.scrollHeight<=0||(this.wrapperEl.style.height=t+"rem")},resize:function(){if(this.setInitialHeight(),this.$el.scrollHeight<=0)return;let e=this.$el.scrollHeight+"px";this.wrapperEl.style.height!==e&&(this.wrapperEl.style.height=e)},setUpResizeObserver:function(){new ResizeObserver(()=>{this.wrapperEl.style.height=this.$el.style.height}).observe(this.$el)}}}export{r as default}; 2 | -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: 3 | -------------------------------------------------------------------------------- /rector.php: -------------------------------------------------------------------------------- 1 | withPaths([ 9 | __DIR__.'/app', 10 | __DIR__.'/bootstrap/app.php', 11 | __DIR__.'/config', 12 | __DIR__.'/database', 13 | __DIR__.'/public', 14 | ]) 15 | ->withPreparedSets( 16 | deadCode: true, 17 | codeQuality: true, 18 | typeDeclarations: true, 19 | privatization: true, 20 | earlyReturn: true, 21 | strictBooleans: true, 22 | ) 23 | ->withPhpSets(); 24 | -------------------------------------------------------------------------------- /resources/css/app.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; 4 | 5 | [x-cloak] { 6 | display: none !important; 7 | } 8 | 9 | body { 10 | @apply text-gray-700 dark:text-gray-300; 11 | } 12 | -------------------------------------------------------------------------------- /resources/svg/custom.svg: -------------------------------------------------------------------------------- 1 | 3 | 5 | -------------------------------------------------------------------------------- /resources/svg/disk.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | -------------------------------------------------------------------------------- /resources/svg/dropbox.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /resources/svg/email.svg: -------------------------------------------------------------------------------- 1 | 3 | 5 | -------------------------------------------------------------------------------- /resources/svg/force-ssl-disabled.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /resources/svg/force-ssl-enabled.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | -------------------------------------------------------------------------------- /resources/svg/ftp.svg: -------------------------------------------------------------------------------- 1 | 3 | 5 | -------------------------------------------------------------------------------- /resources/svg/hetzner.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /resources/svg/local.svg: -------------------------------------------------------------------------------- 1 | 3 | 5 | -------------------------------------------------------------------------------- /resources/svg/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vitodeploy/vito/2318e1b1dff509df925b3fbf904af46030228fe7/resources/svg/logo.png -------------------------------------------------------------------------------- /resources/svg/memory.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /resources/svg/monitoring.svg: -------------------------------------------------------------------------------- 1 | 3 | 5 | -------------------------------------------------------------------------------- /resources/svg/plug.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | -------------------------------------------------------------------------------- /resources/svg/remote-monitor.svg: -------------------------------------------------------------------------------- 1 | 3 | 5 | -------------------------------------------------------------------------------- /resources/svg/s3.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | -------------------------------------------------------------------------------- /resources/svg/server.svg: -------------------------------------------------------------------------------- 1 | 3 | 5 | -------------------------------------------------------------------------------- /resources/svg/ufw.svg: -------------------------------------------------------------------------------- 1 | 3 | 5 | 7 | -------------------------------------------------------------------------------- /resources/svg/vitomonitor.svg: -------------------------------------------------------------------------------- 1 | 3 | 5 | -------------------------------------------------------------------------------- /resources/svg/www.svg: -------------------------------------------------------------------------------- 1 | 3 | 5 | -------------------------------------------------------------------------------- /resources/views/components/app-version.blade.php: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /resources/views/components/console-view.blade.php: -------------------------------------------------------------------------------- 1 |
merge(["class" => "font-mono relative h-[500px] w-full overflow-auto whitespace-pre-line rounded-xl border border-gray-200 bg-black p-5 text-gray-50 dark:border-gray-800"]) }} 3 | > 4 | {{ $slot }} 5 |
6 | -------------------------------------------------------------------------------- /resources/views/components/container.blade.php: -------------------------------------------------------------------------------- 1 |
6 | {!! $content !!} 7 |
8 | -------------------------------------------------------------------------------- /resources/views/components/dynamic-widget.blade.php: -------------------------------------------------------------------------------- 1 | @livewire($widget, $params ?? [], key($widget)) 2 | -------------------------------------------------------------------------------- /resources/views/components/form.blade.php: -------------------------------------------------------------------------------- 1 |
2 |
3 | {{ $this->form }} 4 |
5 | 6 |
7 | -------------------------------------------------------------------------------- /resources/views/components/infolist.blade.php: -------------------------------------------------------------------------------- 1 |
2 | {{ $this->infolist }} 3 | 4 |
5 | -------------------------------------------------------------------------------- /resources/views/components/link.blade.php: -------------------------------------------------------------------------------- 1 | {{ $text }} 2 | -------------------------------------------------------------------------------- /resources/views/components/page.blade.php: -------------------------------------------------------------------------------- 1 |
getExtraAttributesBag() }}> 2 | 3 | @if (method_exists($this, "getSecondSubNavigation") && count($this->getSecondSubNavigation()) > 0) 4 | 5 | @endif 6 | 7 | @foreach ($this->getWidgets() as $key => $widget) 8 | @livewire($widget[0], $widget[1] ?? [], key(class_basename($widget[0]) . "-" . $key)) 9 | @endforeach 10 | 11 |
12 | -------------------------------------------------------------------------------- /resources/views/components/progress-bar.blade.php: -------------------------------------------------------------------------------- 1 | @props(["value" => 0]) 2 | 3 |
4 |
8 | 11 | {{ $value }}% 12 | 13 |
14 | -------------------------------------------------------------------------------- /resources/views/fields/alert.blade.php: -------------------------------------------------------------------------------- 1 |
2 |
3 |
6 | {!! $getMessage() !!} 7 |
8 |
9 |
10 | -------------------------------------------------------------------------------- /resources/views/ssh/composer/composer-install.blade.php: -------------------------------------------------------------------------------- 1 | if ! cd {{ $path }}; then 2 | echo 'VITO_SSH_ERROR' && exit 1 3 | fi 4 | 5 | if ! php{{ $phpVersion }} /usr/local/bin/composer install --no-interaction --prefer-dist --optimize-autoloader --no-dev; then 6 | echo 'VITO_SSH_ERROR' && exit 1 7 | fi 8 | -------------------------------------------------------------------------------- /resources/views/ssh/cron/update.blade.php: -------------------------------------------------------------------------------- 1 | if ! echo '{!! $cron !!}' | sudo -u {{ $user }} crontab -; then 2 | echo 'VITO_SSH_ERROR' && exit 1 3 | fi 4 | 5 | if ! sudo -u {{ $user }} crontab -l; then 6 | echo 'VITO_SSH_ERROR' && exit 1 7 | fi 8 | 9 | echo 'cron updated!' 10 | -------------------------------------------------------------------------------- /resources/views/ssh/git/checkout.blade.php: -------------------------------------------------------------------------------- 1 | if ! cd {{ $path }}; then 2 | echo 'VITO_SSH_ERROR' && exit 1 3 | fi 4 | 5 | if ! git checkout -f {{ $branch }}; then 6 | echo 'VITO_SSH_ERROR' && exit 1 7 | fi 8 | -------------------------------------------------------------------------------- /resources/views/ssh/git/fetch-origin.blade.php: -------------------------------------------------------------------------------- 1 | if ! cd {{ $path }}; then 2 | echo 'VITO_SSH_ERROR' && exit 1 3 | fi 4 | 5 | if ! git fetch origin; then 6 | echo 'VITO_SSH_ERROR' && exit 1 7 | fi 8 | -------------------------------------------------------------------------------- /resources/views/ssh/os/available-updates.blade.php: -------------------------------------------------------------------------------- 1 | sudo DEBIAN_FRONTEND=noninteractive apt-get update 2 | 3 | AVAILABLE_UPDATES=$(sudo DEBIAN_FRONTEND=noninteractive apt list --upgradable | wc -l) 4 | 5 | echo "Available updates:$AVAILABLE_UPDATES" 6 | -------------------------------------------------------------------------------- /resources/views/ssh/os/cleanup.blade.php: -------------------------------------------------------------------------------- 1 | # Update package lists 2 | sudo DEBIAN_FRONTEND=noninteractive apt-get update -y 3 | 4 | # Remove unnecessary dependencies 5 | sudo DEBIAN_FRONTEND=noninteractive apt-get autoremove --purge -y 6 | 7 | # Clear package cache 8 | sudo DEBIAN_FRONTEND=noninteractive apt-get clean -y 9 | 10 | # Remove old configuration files 11 | sudo DEBIAN_FRONTEND=noninteractive apt-get purge -y $(dpkg -l | grep '^rc' | awk '{print $2}') 12 | 13 | # Clear temporary files 14 | sudo rm -rf /tmp/* 15 | 16 | # Clear journal logs 17 | sudo DEBIAN_FRONTEND=noninteractive journalctl --vacuum-time=1d 18 | 19 | echo "Cleanup completed." 20 | -------------------------------------------------------------------------------- /resources/views/ssh/os/create-user.blade.php: -------------------------------------------------------------------------------- 1 | export DEBIAN_FRONTEND=noninteractive 2 | echo "{{ $key }}" | sudo tee -a /root/.ssh/authorized_keys 3 | sudo useradd -p $(openssl passwd -1 {{ $password }}) {{ $user }} 4 | sudo usermod -aG sudo {{ $user }} 5 | echo "{{ $user }} ALL=(ALL) NOPASSWD:ALL" | sudo tee -a /etc/sudoers 6 | sudo mkdir /home/{{ $user }} 7 | sudo mkdir /home/{{ $user }}/.ssh 8 | echo "{{ $key }}" | sudo tee -a /home/{{ $user }}/.ssh/authorized_keys 9 | sudo chown -R {{ $user }}:{{ $user }} /home/{{ $user }} 10 | sudo chsh -s /bin/bash {{ $user }} 11 | sudo su - {{ $user }} -c "ssh-keygen -t rsa -N '' -f ~/.ssh/id_rsa" <<< y 12 | -------------------------------------------------------------------------------- /resources/views/ssh/os/delete-file.blade.php: -------------------------------------------------------------------------------- 1 | rm -rf {{ $path }} 2 | -------------------------------------------------------------------------------- /resources/views/ssh/os/delete-isolated-user.blade.php: -------------------------------------------------------------------------------- 1 | sudo gpasswd -d {{ $serverUser }} {{ $user }} 2 | sudo userdel -r "{{ $user }}" 3 | echo "User {{ $user }} has been deleted." 4 | -------------------------------------------------------------------------------- /resources/views/ssh/os/delete-ssh-key.blade.php: -------------------------------------------------------------------------------- 1 | bash -c 'ssh_key_to_delete="$1"; sed -i "\#${ssh_key_to_delete//\//\\/}#d" /home/vito/.ssh/authorized_keys' bash '{{ $key }}' 2 | -------------------------------------------------------------------------------- /resources/views/ssh/os/deploy-ssh-key.blade.php: -------------------------------------------------------------------------------- 1 | if ! echo '{!! $key !!}' | sudo tee -a ~/.ssh/authorized_keys; then 2 | echo 'VITO_SSH_ERROR' && exit 1 3 | fi 4 | -------------------------------------------------------------------------------- /resources/views/ssh/os/download.blade.php: -------------------------------------------------------------------------------- 1 | if ! wget {{ $url }} -O {{ $path }}; then 2 | echo 'VITO_SSH_ERROR' && exit 1 3 | fi 4 | -------------------------------------------------------------------------------- /resources/views/ssh/os/edit-file.blade.php: -------------------------------------------------------------------------------- 1 | @if($sudo) sudo @endif tee {!! $path !!} << 'VITO_SSH_EOF' > /dev/null 2 | {!! $content !!} 3 | VITO_SSH_EOF 4 | 5 | if [ $? -eq 0 ]; then 6 | echo "Successfully wrote to {{ $path }}" 7 | else 8 | echo 'VITO_SSH_ERROR' && exit 1 9 | fi 10 | -------------------------------------------------------------------------------- /resources/views/ssh/os/extract.blade.php: -------------------------------------------------------------------------------- 1 | @php 2 | $extension = pathinfo($path, PATHINFO_EXTENSION); 3 | @endphp 4 | 5 | @if($extension === 'zip') 6 | unzip -o {{ $path }} -d {{ $destination }} 7 | @elseif($extension === 'tar')) 8 | tar -xf {{ $path }} -C {{ $destination }} 9 | @elseif(in_array($extension, ['gz', 'tar.gz'])) 10 | tar -xzf {{ $path }} -C {{ $destination }} 11 | @elseif(in_array($extension, ['bz2', 'tar.bz2'])) 12 | tar -xjf {{ $path }} -C {{ $destination }} 13 | @else 14 | echo "Unsupported archive format: {{ $extension }}" 15 | @endif 16 | -------------------------------------------------------------------------------- /resources/views/ssh/os/generate-ssh-key.blade.php: -------------------------------------------------------------------------------- 1 | ssh-keygen -t rsa -b 4096 -N "" -f ~/.ssh/{{ $name }} 2 | -------------------------------------------------------------------------------- /resources/views/ssh/os/get-public-key.blade.php: -------------------------------------------------------------------------------- 1 | cat ~/.ssh/id_rsa.pub 2 | -------------------------------------------------------------------------------- /resources/views/ssh/os/install-dependencies.blade.php: -------------------------------------------------------------------------------- 1 | sudo DEBIAN_FRONTEND=noninteractive apt-get install -y software-properties-common curl zip unzip git gcc openssl ufw 2 | git config --global user.email "{{ $email }}" 3 | git config --global user.name "{{ $name }}" 4 | 5 | # Install Node.js 6 | curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash - 7 | sudo DEBIAN_FRONTEND=noninteractive apt-get update 8 | sudo DEBIAN_FRONTEND=noninteractive apt-get install nodejs -y 9 | -------------------------------------------------------------------------------- /resources/views/ssh/os/read-file.blade.php: -------------------------------------------------------------------------------- 1 | [ -f {{ $path }} ] && sudo cat {{ $path }} 2 | -------------------------------------------------------------------------------- /resources/views/ssh/os/read-ssh-key.blade.php: -------------------------------------------------------------------------------- 1 | cat ~/.ssh/{{ $name }}.pub 2 | -------------------------------------------------------------------------------- /resources/views/ssh/os/reboot.blade.php: -------------------------------------------------------------------------------- 1 | echo "Rebooting..." 2 | 3 | sudo reboot 4 | -------------------------------------------------------------------------------- /resources/views/ssh/os/resource-info.blade.php: -------------------------------------------------------------------------------- 1 | echo "load:$(uptime | awk -F'load average:' '{print $2}' | awk -F, '{print $1}' | tr -d ' ')" 2 | echo "memory_total:$(free -k | awk 'NR==2{print $2}')" 3 | echo "memory_used:$(free -k | awk 'NR==2{print $3}')" 4 | echo "memory_free:$(free -k | awk 'NR==2{print $7}')" 5 | echo "disk_total:$(df -BM / | awk 'NR==2{print $2}' | sed 's/M//')" 6 | echo "disk_used:$(df -BM / | awk 'NR==2{print $3}' | sed 's/M//')" 7 | echo "disk_free:$(df -BM / | awk 'NR==2{print $4}' | sed 's/M//')" 8 | -------------------------------------------------------------------------------- /resources/views/ssh/os/run-script.blade.php: -------------------------------------------------------------------------------- 1 | if ! cd {{ $path }}; then 2 | echo 'VITO_SSH_ERROR' && exit 1 3 | fi 4 | 5 | {!! $script !!} 6 | -------------------------------------------------------------------------------- /resources/views/ssh/os/tail.blade.php: -------------------------------------------------------------------------------- 1 | sudo tail -n {{ $lines }} {{ $path }} 2 | -------------------------------------------------------------------------------- /resources/views/ssh/os/upgrade.blade.php: -------------------------------------------------------------------------------- 1 | sudo DEBIAN_FRONTEND=noninteractive apt-get clean 2 | sudo DEBIAN_FRONTEND=noninteractive apt-get update 3 | sudo DEBIAN_FRONTEND=noninteractive apt-get upgrade -y 4 | sudo DEBIAN_FRONTEND=noninteractive apt-get autoremove -y 5 | -------------------------------------------------------------------------------- /resources/views/ssh/services/database/mariadb/backup.blade.php: -------------------------------------------------------------------------------- 1 | if ! sudo DEBIAN_FRONTEND=noninteractive mysqldump -u root {{ $database }} > {{ $file }}.sql; then 2 | echo 'VITO_SSH_ERROR' && exit 1 3 | fi 4 | 5 | if ! DEBIAN_FRONTEND=noninteractive zip {{ $file }}.zip {{ $file }}.sql; then 6 | echo 'VITO_SSH_ERROR' && exit 1 7 | fi 8 | 9 | if ! rm {{ $file }}.sql; then 10 | echo 'VITO_SSH_ERROR' && exit 1 11 | fi 12 | -------------------------------------------------------------------------------- /resources/views/ssh/services/database/mariadb/create-user.blade.php: -------------------------------------------------------------------------------- 1 | if ! sudo mariadb -e "CREATE USER IF NOT EXISTS '{{ $username }}'@'{{ $host }}' IDENTIFIED BY '{{ $password }}'"; then 2 | echo 'VITO_SSH_ERROR' && exit 1 3 | fi 4 | 5 | if ! sudo mariadb -e "FLUSH PRIVILEGES"; then 6 | echo 'VITO_SSH_ERROR' && exit 1 7 | fi 8 | 9 | echo "Command executed" 10 | -------------------------------------------------------------------------------- /resources/views/ssh/services/database/mariadb/create.blade.php: -------------------------------------------------------------------------------- 1 | if ! sudo mariadb -e "CREATE DATABASE IF NOT EXISTS {{ $name }} CHARACTER SET '{{ $charset }}' COLLATE '{{ $collation }}'"; then 2 | echo 'VITO_SSH_ERROR' && exit 1 3 | fi 4 | 5 | echo "Command executed" 6 | -------------------------------------------------------------------------------- /resources/views/ssh/services/database/mariadb/delete-user.blade.php: -------------------------------------------------------------------------------- 1 | if ! sudo mariadb -e "DROP USER IF EXISTS '{{ $username }}'@'{{ $host }}'"; then 2 | echo 'VITO_SSH_ERROR' && exit 1 3 | fi 4 | 5 | if ! sudo mariadb -e "FLUSH PRIVILEGES"; then 6 | echo 'VITO_SSH_ERROR' && exit 1 7 | fi 8 | 9 | echo "Command executed" 10 | -------------------------------------------------------------------------------- /resources/views/ssh/services/database/mariadb/delete.blade.php: -------------------------------------------------------------------------------- 1 | if ! sudo mariadb -e "DROP DATABASE IF EXISTS {{ $name }}"; then 2 | echo 'VITO_SSH_ERROR' && exit 1 3 | fi 4 | 5 | echo "Command executed" 6 | -------------------------------------------------------------------------------- /resources/views/ssh/services/database/mariadb/get-charsets.blade.php: -------------------------------------------------------------------------------- 1 | if ! sudo mariadb -e "SHOW COLLATION;"; 2 | then 3 | echo 'VITO_SSH_ERROR' && exit 1 4 | fi 5 | -------------------------------------------------------------------------------- /resources/views/ssh/services/database/mariadb/get-db-list.blade.php: -------------------------------------------------------------------------------- 1 | if ! sudo mariadb -e "SELECT 2 | SCHEMA_NAME AS database_name, 3 | DEFAULT_CHARACTER_SET_NAME AS charset, 4 | DEFAULT_COLLATION_NAME AS collation 5 | FROM information_schema.SCHEMATA;"; 6 | then 7 | echo 'VITO_SSH_ERROR' && exit 1 8 | fi 9 | 10 | 11 | -------------------------------------------------------------------------------- /resources/views/ssh/services/database/mariadb/get-users-list.blade.php: -------------------------------------------------------------------------------- 1 | if ! sudo mariadb -e "SELECT u.User, 2 | u.Host, 3 | (SELECT group_concat(distinct p.TABLE_SCHEMA) 4 | FROM information_schema.SCHEMA_PRIVILEGES p 5 | WHERE p.GRANTEE = concat('\'', u.User, '\'', '@', '\'', u.Host, '\'')) as Privileges 6 | FROM mysql.user u;"; 7 | then 8 | echo 'VITO_SSH_ERROR' && exit 1 9 | fi 10 | -------------------------------------------------------------------------------- /resources/views/ssh/services/database/mariadb/install-1011.blade.php: -------------------------------------------------------------------------------- 1 | wget https://downloads.mariadb.com/MariaDB/mariadb_repo_setup 2 | 3 | chmod +x mariadb_repo_setup 4 | 5 | sudo DEBIAN_FRONTEND=noninteractive ./mariadb_repo_setup \ 6 | --mariadb-server-version="mariadb-10.11" 7 | 8 | sudo DEBIAN_FRONTEND=noninteractive apt-get update 9 | 10 | sudo DEBIAN_FRONTEND=noninteractive apt-get install mariadb-server mariadb-backup -y 11 | 12 | sudo systemctl unmask mysql.service 13 | 14 | sudo service mysql start 15 | -------------------------------------------------------------------------------- /resources/views/ssh/services/database/mariadb/install-103.blade.php: -------------------------------------------------------------------------------- 1 | wget https://downloads.mariadb.com/MariaDB/mariadb_repo_setup 2 | 3 | chmod +x mariadb_repo_setup 4 | 5 | sudo DEBIAN_FRONTEND=noninteractive ./mariadb_repo_setup \ 6 | --mariadb-server-version="mariadb-10.3" 7 | 8 | sudo DEBIAN_FRONTEND=noninteractive apt-get update 9 | 10 | sudo DEBIAN_FRONTEND=noninteractive apt-get install mariadb-server mariadb-backup -y 11 | 12 | sudo systemctl unmask mysql.service 13 | 14 | sudo service mysql start 15 | -------------------------------------------------------------------------------- /resources/views/ssh/services/database/mariadb/install-104.blade.php: -------------------------------------------------------------------------------- 1 | wget https://downloads.mariadb.com/MariaDB/mariadb_repo_setup 2 | 3 | chmod +x mariadb_repo_setup 4 | 5 | sudo DEBIAN_FRONTEND=noninteractive ./mariadb_repo_setup \ 6 | --mariadb-server-version="mariadb-10.4" 7 | 8 | sudo DEBIAN_FRONTEND=noninteractive apt-get update 9 | 10 | sudo DEBIAN_FRONTEND=noninteractive apt-get install mariadb-server mariadb-backup -y 11 | 12 | sudo systemctl unmask mysql.service 13 | 14 | sudo service mysql start 15 | -------------------------------------------------------------------------------- /resources/views/ssh/services/database/mariadb/install-106.blade.php: -------------------------------------------------------------------------------- 1 | wget https://downloads.mariadb.com/MariaDB/mariadb_repo_setup 2 | 3 | chmod +x mariadb_repo_setup 4 | 5 | sudo DEBIAN_FRONTEND=noninteractive ./mariadb_repo_setup \ 6 | --mariadb-server-version="mariadb-10.6" 7 | 8 | sudo DEBIAN_FRONTEND=noninteractive apt-get update 9 | 10 | sudo DEBIAN_FRONTEND=noninteractive apt-get install mariadb-server mariadb-backup -y 11 | 12 | sudo systemctl unmask mysql.service 13 | 14 | sudo service mysql start 15 | -------------------------------------------------------------------------------- /resources/views/ssh/services/database/mariadb/install-114.blade.php: -------------------------------------------------------------------------------- 1 | wget https://downloads.mariadb.com/MariaDB/mariadb_repo_setup 2 | 3 | chmod +x mariadb_repo_setup 4 | 5 | sudo DEBIAN_FRONTEND=noninteractive ./mariadb_repo_setup \ 6 | --mariadb-server-version="mariadb-11.4" 7 | 8 | sudo DEBIAN_FRONTEND=noninteractive apt-get update 9 | 10 | sudo DEBIAN_FRONTEND=noninteractive apt-get install mariadb-server mariadb-backup -y 11 | 12 | sudo systemctl unmask mysql.service 13 | 14 | sudo service mysql start 15 | -------------------------------------------------------------------------------- /resources/views/ssh/services/database/mariadb/link.blade.php: -------------------------------------------------------------------------------- 1 | if ! sudo mariadb -e "GRANT ALL PRIVILEGES ON {{ $database }}.* TO '{{ $username }}'@'{{ $host }}'"; then 2 | echo 'VITO_SSH_ERROR' && exit 1 3 | fi 4 | 5 | if ! sudo mariadb -e "FLUSH PRIVILEGES"; then 6 | echo 'VITO_SSH_ERROR' && exit 1 7 | fi 8 | 9 | echo "Linking to {{ $database }} finished" 10 | -------------------------------------------------------------------------------- /resources/views/ssh/services/database/mariadb/restore.blade.php: -------------------------------------------------------------------------------- 1 | if ! DEBIAN_FRONTEND=noninteractive unzip {{ $file }}.zip; then 2 | echo 'VITO_SSH_ERROR' && exit 1 3 | fi 4 | 5 | if ! sudo DEBIAN_FRONTEND=noninteractive mariadb -u root {{ $database }} < {{ $file }}.sql; then 6 | echo 'VITO_SSH_ERROR' && exit 1 7 | fi 8 | 9 | if ! rm {{ $file }}.sql {{ $file }}.zip; then 10 | echo 'VITO_SSH_ERROR' && exit 1 11 | fi 12 | -------------------------------------------------------------------------------- /resources/views/ssh/services/database/mariadb/uninstall.blade.php: -------------------------------------------------------------------------------- 1 | sudo service mariadb stop 2 | 3 | sudo DEBIAN_FRONTEND=noninteractive apt-get remove mariadb-server mariadb-backup -y 4 | 5 | sudo rm -rf /etc/mysql 6 | sudo rm -rf /var/lib/mysql 7 | sudo rm -rf /var/log/mysql 8 | sudo rm -rf /var/run/mysqld 9 | sudo rm -rf /var/run/mysqld/mysqld.sock 10 | -------------------------------------------------------------------------------- /resources/views/ssh/services/database/mariadb/unlink.blade.php: -------------------------------------------------------------------------------- 1 | if ! sudo mariadb -e "REVOKE ALL PRIVILEGES, GRANT OPTION FROM '{{ $username }}'@'{{ $host }}'"; then 2 | echo 'VITO_SSH_ERROR' && exit 1 3 | fi 4 | 5 | echo "Command executed" 6 | -------------------------------------------------------------------------------- /resources/views/ssh/services/database/mysql/backup.blade.php: -------------------------------------------------------------------------------- 1 | if ! sudo DEBIAN_FRONTEND=noninteractive mysqldump -u root {{ $database }} > {{ $file }}.sql; then 2 | echo 'VITO_SSH_ERROR' && exit 1 3 | fi 4 | 5 | if ! DEBIAN_FRONTEND=noninteractive zip {{ $file }}.zip {{ $file }}.sql; then 6 | echo 'VITO_SSH_ERROR' && exit 1 7 | fi 8 | 9 | if ! rm {{ $file }}.sql; then 10 | echo 'VITO_SSH_ERROR' && exit 1 11 | fi 12 | -------------------------------------------------------------------------------- /resources/views/ssh/services/database/mysql/create-user.blade.php: -------------------------------------------------------------------------------- 1 | if ! sudo mysql -e "CREATE USER IF NOT EXISTS '{{ $username }}'@'{{ $host }}' IDENTIFIED BY '{{ $password }}'"; then 2 | echo 'VITO_SSH_ERROR' && exit 1 3 | fi 4 | 5 | if ! sudo mysql -e "FLUSH PRIVILEGES"; then 6 | echo 'VITO_SSH_ERROR' && exit 1 7 | fi 8 | 9 | echo "Command executed" 10 | -------------------------------------------------------------------------------- /resources/views/ssh/services/database/mysql/create.blade.php: -------------------------------------------------------------------------------- 1 | if ! sudo mysql -e "CREATE DATABASE IF NOT EXISTS {{ $name }} CHARACTER SET '{{ $charset }}' COLLATE '{{ $collation }}'"; then 2 | echo 'VITO_SSH_ERROR' && exit 1 3 | fi 4 | 5 | echo "Command executed" 6 | -------------------------------------------------------------------------------- /resources/views/ssh/services/database/mysql/delete-user.blade.php: -------------------------------------------------------------------------------- 1 | if ! sudo mysql -e "DROP USER IF EXISTS '{{ $username }}'@'{{ $host }}'"; then 2 | echo 'VITO_SSH_ERROR' && exit 1 3 | fi 4 | 5 | if ! sudo mysql -e "FLUSH PRIVILEGES"; then 6 | echo 'VITO_SSH_ERROR' && exit 1 7 | fi 8 | 9 | echo "Command executed" 10 | -------------------------------------------------------------------------------- /resources/views/ssh/services/database/mysql/delete.blade.php: -------------------------------------------------------------------------------- 1 | if ! sudo mysql -e "DROP DATABASE IF EXISTS {{ $name }}"; then 2 | echo 'VITO_SSH_ERROR' && exit 1 3 | fi 4 | 5 | echo "Command executed" 6 | -------------------------------------------------------------------------------- /resources/views/ssh/services/database/mysql/get-charsets.blade.php: -------------------------------------------------------------------------------- 1 | if ! sudo mysql -e "SHOW COLLATION;"; then 2 | echo 'VITO_SSH_ERROR' && exit 1 3 | fi 4 | -------------------------------------------------------------------------------- /resources/views/ssh/services/database/mysql/get-db-list.blade.php: -------------------------------------------------------------------------------- 1 | if ! sudo mysql -e "SELECT 2 | SCHEMA_NAME AS database_name, 3 | DEFAULT_CHARACTER_SET_NAME AS charset, 4 | DEFAULT_COLLATION_NAME AS collation 5 | FROM information_schema.SCHEMATA;"; 6 | then 7 | echo 'VITO_SSH_ERROR' && exit 1 8 | fi 9 | -------------------------------------------------------------------------------- /resources/views/ssh/services/database/mysql/get-users-list.blade.php: -------------------------------------------------------------------------------- 1 | if ! sudo mysql -e "SELECT u.User, 2 | u.Host, 3 | (SELECT group_concat(distinct p.TABLE_SCHEMA) 4 | FROM information_schema.SCHEMA_PRIVILEGES p 5 | WHERE p.GRANTEE = concat('\'', u.User, '\'', '@', '\'', u.Host, '\'')) as Privileges 6 | FROM mysql.user u;"; 7 | then 8 | echo 'VITO_SSH_ERROR' && exit 1 9 | fi 10 | -------------------------------------------------------------------------------- /resources/views/ssh/services/database/mysql/install-57.blade.php: -------------------------------------------------------------------------------- 1 | sudo DEBIAN_FRONTEND=noninteractive apt-get install mysql-server -y 2 | 3 | sudo systemctl unmask mysql.service 4 | 5 | sudo service mysql enable 6 | 7 | sudo service mysql start 8 | 9 | if ! sudo mysql -e "ALTER USER 'root'@'localhost' IDENTIFIED WITH auth_socket;"; then 10 | echo 'VITO_SSH_ERROR' && exit 1 11 | fi 12 | 13 | if ! sudo mysql -e "FLUSH PRIVILEGES"; then 14 | echo 'VITO_SSH_ERROR' && exit 1 15 | fi 16 | -------------------------------------------------------------------------------- /resources/views/ssh/services/database/mysql/install-80.blade.php: -------------------------------------------------------------------------------- 1 | sudo DEBIAN_FRONTEND=noninteractive apt-get update 2 | 3 | sudo DEBIAN_FRONTEND=noninteractive apt-get install mysql-server -y 4 | 5 | sudo systemctl unmask mysql.service 6 | 7 | sudo service mysql enable 8 | 9 | sudo service mysql start 10 | 11 | if ! sudo mysql -e "ALTER USER 'root'@'localhost' IDENTIFIED WITH auth_socket;"; then 12 | echo 'VITO_SSH_ERROR' && exit 1 13 | fi 14 | 15 | if ! sudo mysql -e "FLUSH PRIVILEGES"; then 16 | echo 'VITO_SSH_ERROR' && exit 1 17 | fi 18 | -------------------------------------------------------------------------------- /resources/views/ssh/services/database/mysql/link.blade.php: -------------------------------------------------------------------------------- 1 | if ! sudo mysql -e "GRANT ALL PRIVILEGES ON {{ $database }}.* TO '{{ $username }}'@'{{ $host }}'"; then 2 | echo 'VITO_SSH_ERROR' && exit 1 3 | fi 4 | 5 | if ! sudo mysql -e "FLUSH PRIVILEGES"; then 6 | echo 'VITO_SSH_ERROR' && exit 1 7 | fi 8 | 9 | echo "Linking to {{ $database }} finished" 10 | -------------------------------------------------------------------------------- /resources/views/ssh/services/database/mysql/restore.blade.php: -------------------------------------------------------------------------------- 1 | if ! DEBIAN_FRONTEND=noninteractive unzip {{ $file }}.zip; then 2 | echo 'VITO_SSH_ERROR' && exit 1 3 | fi 4 | 5 | if ! sudo DEBIAN_FRONTEND=noninteractive mysql -u root {{ $database }} < {{ $file }}.sql; then 6 | echo 'VITO_SSH_ERROR' && exit 1 7 | fi 8 | 9 | if ! rm {{ $file }}.sql {{ $file }}.zip; then 10 | echo 'VITO_SSH_ERROR' && exit 1 11 | fi 12 | -------------------------------------------------------------------------------- /resources/views/ssh/services/database/mysql/uninstall.blade.php: -------------------------------------------------------------------------------- 1 | sudo service mysql stop 2 | 3 | sudo DEBIAN_FRONTEND=noninteractive apt-get remove mysql-server -y 4 | 5 | sudo rm -rf /etc/mysql 6 | sudo rm -rf /var/lib/mysql 7 | sudo rm -rf /var/log/mysql 8 | sudo rm -rf /var/run/mysqld 9 | sudo rm -rf /var/run/mysqld/mysqld.sock 10 | -------------------------------------------------------------------------------- /resources/views/ssh/services/database/mysql/unlink.blade.php: -------------------------------------------------------------------------------- 1 | if ! sudo mysql -e "REVOKE ALL PRIVILEGES, GRANT OPTION FROM '{{ $username }}'@'{{ $host }}'"; then 2 | echo 'VITO_SSH_ERROR' && exit 1 3 | fi 4 | 5 | echo "Command executed" 6 | -------------------------------------------------------------------------------- /resources/views/ssh/services/database/postgresql/backup.blade.php: -------------------------------------------------------------------------------- 1 | if ! sudo -u postgres pg_dump -d {{ $database }} -f /var/lib/postgresql/{{ $file }}.sql; then 2 | echo 'VITO_SSH_ERROR' && exit 1 3 | fi 4 | 5 | if ! sudo mv /var/lib/postgresql/{{ $file }}.sql /home/vito/{{ $file }}.sql; then 6 | echo 'VITO_SSH_ERROR' && exit 1 7 | fi 8 | 9 | if ! sudo chown vito:vito /home/vito/{{ $file }}.sql; then 10 | echo 'VITO_SSH_ERROR' && exit 1 11 | fi 12 | 13 | if ! DEBIAN_FRONTEND=noninteractive zip {{ $file }}.zip {{ $file }}.sql; then 14 | echo 'VITO_SSH_ERROR' && exit 1 15 | fi 16 | 17 | if ! rm {{ $file }}.sql; then 18 | echo 'VITO_SSH_ERROR' && exit 1 19 | fi 20 | -------------------------------------------------------------------------------- /resources/views/ssh/services/database/postgresql/create-user.blade.php: -------------------------------------------------------------------------------- 1 | if ! sudo -u postgres psql -c "CREATE ROLE \"{{ $username }}\" WITH LOGIN PASSWORD '{{ $password }}';"; then 2 | echo 'VITO_SSH_ERROR' && exit 1 3 | fi 4 | 5 | echo "User {{ $username }} created" 6 | -------------------------------------------------------------------------------- /resources/views/ssh/services/database/postgresql/create.blade.php: -------------------------------------------------------------------------------- 1 | if ! sudo -u postgres psql -c "CREATE DATABASE \"{{ $name }}\" WITH ENCODING '{{ $charset }}'"; then 2 | echo 'VITO_SSH_ERROR' && exit 1 3 | fi 4 | 5 | echo "Database {{ $name }} created" 6 | -------------------------------------------------------------------------------- /resources/views/ssh/services/database/postgresql/delete-user.blade.php: -------------------------------------------------------------------------------- 1 | if ! sudo -u postgres psql -c "DROP USER \"{{ $username }}\""; then 2 | echo 'VITO_SSH_ERROR' && exit 1 3 | fi 4 | 5 | echo "User {{ $username }} deleted" 6 | -------------------------------------------------------------------------------- /resources/views/ssh/services/database/postgresql/delete.blade.php: -------------------------------------------------------------------------------- 1 | if ! sudo -u postgres psql -c "DROP DATABASE \"{{ $name }}\""; then 2 | echo 'VITO_SSH_ERROR' && exit 1 3 | fi 4 | 5 | echo "Database {{ $name }} deleted" 6 | -------------------------------------------------------------------------------- /resources/views/ssh/services/database/postgresql/get-charsets.blade.php: -------------------------------------------------------------------------------- 1 | if ! sudo -u postgres psql -c "SELECT collname as collation, 2 | pg_encoding_to_char(collencoding) as charset, 3 | '' as id, 4 | '' as \"default\", 5 | 'Yes' as compiled, 6 | '' as sortlen, 7 | '' as pad_attribute 8 | FROM pg_collation 9 | WHERE not pg_encoding_to_char(collencoding) = '' 10 | ORDER BY charset;"; 11 | then 12 | echo 'VITO_SSH_ERROR' && exit 1 13 | fi 14 | -------------------------------------------------------------------------------- /resources/views/ssh/services/database/postgresql/get-db-list.blade.php: -------------------------------------------------------------------------------- 1 | if ! sudo -u postgres psql -c "SELECT 2 | datname AS database_name, 3 | pg_encoding_to_char(encoding) AS charset, 4 | datcollate AS collation 5 | FROM pg_database;"; 6 | then 7 | echo 'VITO_SSH_ERROR' && exit 1 8 | fi 9 | -------------------------------------------------------------------------------- /resources/views/ssh/services/database/postgresql/get-users-list.blade.php: -------------------------------------------------------------------------------- 1 | if ! sudo -u postgres psql -c "SELECT r.rolname AS username, 2 | '' as host, 3 | STRING_AGG(d.datname, ',') AS databases 4 | FROM pg_roles r 5 | JOIN 6 | pg_database d ON has_database_privilege(r.rolname, d.datname, 'CONNECT') 7 | WHERE r.rolcanlogin 8 | GROUP BY r.rolname 9 | ORDER BY r.rolname;"; 10 | then 11 | echo 'VITO_SSH_ERROR' && exit 1 12 | fi 13 | -------------------------------------------------------------------------------- /resources/views/ssh/services/database/postgresql/install-12.blade.php: -------------------------------------------------------------------------------- 1 | sudo sh -c 'echo "deb https://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list' 2 | 3 | wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - 4 | 5 | sudo DEBIAN_FRONTEND=noninteractive apt-get update -y 6 | 7 | sudo DEBIAN_FRONTEND=noninteractive apt-get install postgresql-12 -y 8 | 9 | systemctl status postgresql 10 | 11 | sudo -u postgres psql -c "SELECT version();" 12 | -------------------------------------------------------------------------------- /resources/views/ssh/services/database/postgresql/install-13.blade.php: -------------------------------------------------------------------------------- 1 | sudo sh -c 'echo "deb https://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list' 2 | 3 | wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - 4 | 5 | sudo DEBIAN_FRONTEND=noninteractive apt-get update -y 6 | 7 | sudo DEBIAN_FRONTEND=noninteractive apt-get install postgresql-13 -y 8 | 9 | systemctl status postgresql 10 | 11 | sudo -u postgres psql -c "SELECT version();" 12 | -------------------------------------------------------------------------------- /resources/views/ssh/services/database/postgresql/install-14.blade.php: -------------------------------------------------------------------------------- 1 | sudo sh -c 'echo "deb https://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list' 2 | 3 | wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - 4 | 5 | sudo DEBIAN_FRONTEND=noninteractive apt-get update -y 6 | 7 | sudo DEBIAN_FRONTEND=noninteractive apt-get install postgresql-14 -y 8 | 9 | systemctl status postgresql 10 | 11 | sudo -u postgres psql -c "SELECT version();" 12 | -------------------------------------------------------------------------------- /resources/views/ssh/services/database/postgresql/install-15.blade.php: -------------------------------------------------------------------------------- 1 | sudo sh -c 'echo "deb https://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list' 2 | 3 | wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - 4 | 5 | sudo DEBIAN_FRONTEND=noninteractive apt-get update -y 6 | 7 | sudo DEBIAN_FRONTEND=noninteractive apt-get install postgresql-15 -y 8 | 9 | systemctl status postgresql 10 | 11 | sudo -u postgres psql -c "SELECT version();" 12 | -------------------------------------------------------------------------------- /resources/views/ssh/services/database/postgresql/install-16.blade.php: -------------------------------------------------------------------------------- 1 | sudo sh -c 'echo "deb https://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list' 2 | 3 | wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - 4 | 5 | sudo DEBIAN_FRONTEND=noninteractive apt-get update -y 6 | 7 | sudo DEBIAN_FRONTEND=noninteractive apt-get install postgresql-16 -y 8 | 9 | systemctl status postgresql 10 | 11 | sudo -u postgres psql -c "SELECT version();" 12 | -------------------------------------------------------------------------------- /resources/views/ssh/services/database/postgresql/link.blade.php: -------------------------------------------------------------------------------- 1 | USER_TO_LINK='{{ $username }}' 2 | DB_NAME='{{ $database }}' 3 | DB_VERSION='{{ $version }}' 4 | 5 | if ! sudo -u postgres psql -c "GRANT ALL PRIVILEGES ON DATABASE \"$DB_NAME\" TO $USER_TO_LINK;"; then 6 | echo 'VITO_SSH_ERROR' && exit 1 7 | fi 8 | 9 | # Check if PostgreSQL version is 15 or greater 10 | if [ "$DB_VERSION" -ge 15 ]; then 11 | if ! sudo -u postgres psql -d "$DB_NAME" -c "GRANT USAGE, CREATE ON SCHEMA public TO $USER_TO_LINK;"; then 12 | echo 'VITO_SSH_ERROR' && exit 1 13 | fi 14 | fi 15 | 16 | echo "Linking to $DB_NAME finished" 17 | -------------------------------------------------------------------------------- /resources/views/ssh/services/database/postgresql/restore.blade.php: -------------------------------------------------------------------------------- 1 | if ! DEBIAN_FRONTEND=noninteractive unzip {{ $file }}.zip; then 2 | echo 'VITO_SSH_ERROR' && exit 1 3 | fi 4 | 5 | if ! sudo -u postgres psql -d {{ $database }} -f {{ $file }}.sql; then 6 | echo 'VITO_SSH_ERROR' && exit 1 7 | fi 8 | 9 | if ! rm {{ $file }}.sql {{ $file }}.zip; then 10 | echo 'VITO_SSH_ERROR' && exit 1 11 | fi 12 | -------------------------------------------------------------------------------- /resources/views/ssh/services/database/postgresql/uninstall.blade.php: -------------------------------------------------------------------------------- 1 | sudo service postgresql stop 2 | 3 | sudo DEBIAN_FRONTEND=noninteractive apt-get remove postgresql-* -y 4 | 5 | sudo rm -rf /etc/postgresql 6 | sudo rm -rf /var/lib/postgresql 7 | sudo rm -rf /var/log/postgresql 8 | sudo rm -rf /var/run/postgresql 9 | sudo rm -rf /var/run/postgresql/postmaster.pid 10 | sudo rm -rf /var/run/postgresql/.s.PGSQL.5432 11 | sudo rm -rf /var/run/postgresql/.s.PGSQL.5432.lock 12 | -------------------------------------------------------------------------------- /resources/views/ssh/services/database/postgresql/unlink.blade.php: -------------------------------------------------------------------------------- 1 | USER_TO_REVOKE='{{ $username }}' 2 | DB_VERSION='{{ $version }}' 3 | 4 | DATABASES=$(sudo -u postgres psql -t -c "SELECT datname FROM pg_database WHERE datistemplate = false;") 5 | 6 | for DB in $DATABASES; do 7 | echo "Revoking privileges in database: $DB" 8 | sudo -u postgres psql -d "$DB" -c "REVOKE ALL PRIVILEGES ON DATABASE \"$DB\" FROM $USER_TO_REVOKE;" 9 | 10 | # Check if PostgreSQL version is 15 or greater 11 | if [ "$DB_VERSION" -ge 15 ]; then 12 | sudo -u postgres psql -d "$DB" -c "REVOKE USAGE, CREATE ON SCHEMA public FROM $USER_TO_REVOKE;" 13 | fi 14 | done 15 | 16 | echo "Privileges revoked from $USER_TO_REVOKE" 17 | -------------------------------------------------------------------------------- /resources/views/ssh/services/firewall/ufw/backup-rules.blade.php: -------------------------------------------------------------------------------- 1 | sudo cp /etc/ufw/before.rules /tmp/ufw.before.backup 2 | sudo cp /etc/ufw/after.rules /tmp/ufw.after.backup 3 | sudo cp /etc/ufw/user.rules /tmp/ufw.user.backup 4 | sudo cp /etc/ufw/before6.rules /tmp/ufw.before6.backup 5 | sudo cp /etc/ufw/after6.rules /tmp/ufw.after6.backup 6 | sudo cp /etc/ufw/user6.rules /tmp/ufw.user6.backup 7 | -------------------------------------------------------------------------------- /resources/views/ssh/services/firewall/ufw/clear-backups.blade.php: -------------------------------------------------------------------------------- 1 | sudo rm -f /tmp/ufw.before.backup 2 | sudo rm -f /tmp/ufw.after.backup 3 | sudo rm -f /tmp/ufw.user.backup 4 | sudo rm -f /tmp/ufw.before6.backup 5 | sudo rm -f /tmp/ufw.after6.backup 6 | sudo rm -f /tmp/ufw.user6.backup 7 | -------------------------------------------------------------------------------- /resources/views/ssh/services/firewall/ufw/install-ufw.blade.php: -------------------------------------------------------------------------------- 1 | if ! sudo ufw default deny incoming; then 2 | echo 'VITO_SSH_ERROR' && exit 1 3 | fi 4 | 5 | if ! sudo ufw default allow outgoing; then 6 | echo 'VITO_SSH_ERROR' && exit 1 7 | fi 8 | 9 | if ! sudo ufw allow from 0.0.0.0/0 to any proto tcp port 22; then 10 | echo 'VITO_SSH_ERROR' && exit 1 11 | fi 12 | 13 | if ! sudo ufw allow from 0.0.0.0/0 to any proto tcp port 80; then 14 | echo 'VITO_SSH_ERROR' && exit 1 15 | fi 16 | 17 | if ! sudo ufw allow from 0.0.0.0/0 to any proto tcp port 443; then 18 | echo 'VITO_SSH_ERROR' && exit 1 19 | fi 20 | 21 | if ! sudo ufw --force enable; then 22 | echo 'VITO_SSH_ERROR' && exit 1 23 | fi 24 | 25 | if ! sudo ufw reload; then 26 | echo 'VITO_SSH_ERROR' && exit 1 27 | fi 28 | -------------------------------------------------------------------------------- /resources/views/ssh/services/firewall/ufw/restore-rules.blade.php: -------------------------------------------------------------------------------- 1 | sudo ufw --force disable 2 | 3 | sudo cp /tmp/ufw.before.backup /etc/ufw/before.rules 4 | sudo cp /tmp/ufw.after.backup /etc/ufw/after.rules 5 | sudo cp /tmp/ufw.user.backup /etc/ufw/user.rules 6 | sudo cp /tmp/ufw.before6.backup /etc/ufw/before6.rules 7 | sudo cp /tmp/ufw.after6.backup /etc/ufw/after6.rules 8 | sudo cp /tmp/ufw.user6.backup /etc/ufw/user6.rules 9 | 10 | sudo ufw --force enable 11 | -------------------------------------------------------------------------------- /resources/views/ssh/services/monitoring/vito-agent/uninstall.blade.php: -------------------------------------------------------------------------------- 1 | sudo service vito-agent stop 2 | 3 | sudo systemctl disable vito-agent 4 | 5 | sudo rm -f /usr/local/bin/vito-agent 6 | 7 | sudo rm -f /etc/systemd/system/vito-agent.service 8 | 9 | sudo rm -rf /etc/vito-agent 10 | 11 | sudo systemctl daemon-reload 12 | 13 | echo "Vito Agent uninstalled successfully" 14 | -------------------------------------------------------------------------------- /resources/views/ssh/services/nodejs/change-default-nodejs.blade.php: -------------------------------------------------------------------------------- 1 | export NVM_DIR="$HOME/.nvm" 2 | [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" 3 | 4 | if ! nvm alias default {{ $version }}; then 5 | echo 'VITO_SSH_ERROR' && exit 1 6 | fi 7 | 8 | if ! nvm use default; then 9 | echo 'VITO_SSH_ERROR' && exit 1 10 | fi 11 | 12 | echo "Default Node.js is now:" 13 | node -v 14 | -------------------------------------------------------------------------------- /resources/views/ssh/services/nodejs/uninstall-nodejs.blade.php: -------------------------------------------------------------------------------- 1 | export NVM_DIR="$HOME/.nvm" 2 | [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" 3 | 4 | @if ($default) 5 | if ! nvm unalias default; then 6 | echo 'VITO_SSH_ERROR' && exit 1 7 | fi 8 | if ! nvm deactivate; then 9 | echo 'VITO_SSH_ERROR' && exit 1 10 | fi 11 | @endif 12 | 13 | if ! nvm uninstall {{ $version }}; then 14 | echo 'VITO_SSH_ERROR' && exit 1 15 | fi 16 | -------------------------------------------------------------------------------- /resources/views/ssh/services/php/change-default-php.blade.php: -------------------------------------------------------------------------------- 1 | if ! sudo rm /usr/bin/php; then 2 | echo 'VITO_SSH_ERROR' && exit 1 3 | fi 4 | 5 | if ! sudo ln -s /usr/bin/php{{ $version }} /usr/bin/php; then 6 | echo 'VITO_SSH_ERROR' && exit 1 7 | fi 8 | 9 | echo "Default php is: " 10 | 11 | php -v 12 | -------------------------------------------------------------------------------- /resources/views/ssh/services/php/fpm-pool.blade.php: -------------------------------------------------------------------------------- 1 | [{{ $user }}] 2 | user = {{ $user }} 3 | group = {{ $user }} 4 | 5 | listen = /run/php/php{{ $version }}-fpm-{{ $user }}.sock 6 | listen.owner = vito 7 | listen.group = vito 8 | listen.mode = 0660 9 | 10 | pm = dynamic 11 | pm.max_children = 5 12 | pm.start_servers = 2 13 | pm.min_spare_servers = 1 14 | pm.max_spare_servers = 3 15 | pm.max_requests = 500 16 | 17 | php_admin_value[open_basedir] = /home/{{ $user }}/:/tmp/ 18 | php_admin_value[upload_tmp_dir] = /home/{{ $user }}/tmp 19 | php_admin_value[session.save_path] = /home/{{ $user }}/tmp 20 | php_admin_value[display_errors] = off 21 | php_admin_value[log_errors] = on 22 | php_admin_value[error_log] = /home/{{ $user }}/.logs/php_errors.log 23 | -------------------------------------------------------------------------------- /resources/views/ssh/services/php/install-composer.blade.php: -------------------------------------------------------------------------------- 1 | cd ~ 2 | 3 | curl -sS https://getcomposer.org/installer -o composer-setup.php 4 | 5 | sudo php composer-setup.php --install-dir=/usr/local/bin --filename=composer 6 | 7 | rm composer-setup.php 8 | 9 | composer 10 | -------------------------------------------------------------------------------- /resources/views/ssh/services/php/install-php-extension.blade.php: -------------------------------------------------------------------------------- 1 | sudo apt-get install -y php{{ $version }}-{{ $name }} 2 | 3 | sudo service php{{ $version }}-fpm restart 4 | 5 | php{{ $version }} -m 6 | -------------------------------------------------------------------------------- /resources/views/ssh/services/php/remove-fpm-pool.blade.php: -------------------------------------------------------------------------------- 1 | sudo rm -f /etc/php/{{ $version }}/fpm/pool.d/{{ $user }}.conf 2 | sudo service php{{ $version }}-fpm restart 3 | -------------------------------------------------------------------------------- /resources/views/ssh/services/php/uninstall-php.blade.php: -------------------------------------------------------------------------------- 1 | sudo service php{{ $version }}-fpm stop 2 | 3 | if ! sudo DEBIAN_FRONTEND=noninteractive apt-get remove -y php{{ $version }} php{{ $version }}-fpm php{{ $version }}-mbstring php{{ $version }}-mysql php{{ $version }}-mcrypt php{{ $version }}-gd php{{ $version }}-xml php{{ $version }}-curl php{{ $version }}-gettext php{{ $version }}-zip php{{ $version }}-bcmath php{{ $version }}-soap php{{ $version }}-redis php{{ $version }}-sqlite3; then 4 | echo 'VITO_SSH_ERROR' && exit 1 5 | fi 6 | -------------------------------------------------------------------------------- /resources/views/ssh/services/php/update-php-settings.blade.php: -------------------------------------------------------------------------------- 1 | if ! sudo sed -i 's,^{{ $variable }} =.*$,{{ $variable }} = {{ $value }},' /etc/php/{{ $version }}/cli/php.ini; then 2 | echo 'VITO_SSH_ERROR' && exit 1 3 | fi 4 | 5 | if ! sudo sed -i 's,^{{ $variable }} =.*$,{{ $variable }} = {{ $value }},' /etc/php/{{ $version }}/fpm/php.ini; then 6 | echo 'VITO_SSH_ERROR' && exit 1 7 | fi 8 | 9 | if ! sudo service php{{ $version }}-fpm restart; then 10 | echo 'VITO_SSH_ERROR' && exit 1 11 | fi 12 | -------------------------------------------------------------------------------- /resources/views/ssh/services/process-manager/supervisor/create-worker.blade.php: -------------------------------------------------------------------------------- 1 | if ! sudo mkdir -p "$(dirname {{ $logFile }})"; then 2 | echo 'VITO_SSH_ERROR' && exit 1 3 | fi 4 | 5 | if ! sudo touch {{ $logFile }}; then 6 | echo 'VITO_SSH_ERROR' && exit 1 7 | fi 8 | 9 | if ! sudo chown {{ $user }}:{{ $user }} {{ $logFile }}; then 10 | echo 'VITO_SSH_ERROR' && exit 1 11 | fi 12 | 13 | if ! sudo supervisorctl reread; then 14 | echo 'VITO_SSH_ERROR' && exit 1 15 | fi 16 | 17 | if ! sudo supervisorctl update; then 18 | echo 'VITO_SSH_ERROR' && exit 1 19 | fi 20 | 21 | if ! sudo supervisorctl start {{ $id }}:*; then 22 | echo 'VITO_SSH_ERROR' && exit 1 23 | fi 24 | -------------------------------------------------------------------------------- /resources/views/ssh/services/process-manager/supervisor/delete-worker.blade.php: -------------------------------------------------------------------------------- 1 | if ! sudo supervisorctl stop {{ $id }}:*; then 2 | echo 'VITO_SSH_ERROR' && exit 1 3 | fi 4 | 5 | if ! sudo rm -rf ~/.logs/workers/{{ $id }}.log; then 6 | echo 'VITO_SSH_ERROR' && exit 1 7 | fi 8 | 9 | if ! sudo rm -rf /etc/supervisor/conf.d/{{ $id }}.conf; then 10 | echo 'VITO_SSH_ERROR' && exit 1 11 | fi 12 | 13 | if ! sudo supervisorctl reread; then 14 | echo 'VITO_SSH_ERROR' && exit 1 15 | fi 16 | 17 | if ! sudo supervisorctl update; then 18 | echo 'VITO_SSH_ERROR' && exit 1 19 | fi 20 | -------------------------------------------------------------------------------- /resources/views/ssh/services/process-manager/supervisor/install-supervisor.blade.php: -------------------------------------------------------------------------------- 1 | sudo DEBIAN_FRONTEND=noninteractive apt-get install supervisor -y 2 | 3 | sudo service supervisor enable 4 | 5 | sudo service supervisor start 6 | -------------------------------------------------------------------------------- /resources/views/ssh/services/process-manager/supervisor/restart-worker.blade.php: -------------------------------------------------------------------------------- 1 | if ! sudo supervisorctl restart {{ $id }}:*; then 2 | echo 'VITO_SSH_ERROR' && exit 1 3 | fi 4 | -------------------------------------------------------------------------------- /resources/views/ssh/services/process-manager/supervisor/start-worker.blade.php: -------------------------------------------------------------------------------- 1 | if ! sudo supervisorctl start {{ $id }}:*; then 2 | echo 'VITO_SSH_ERROR' && exit 1 3 | fi 4 | -------------------------------------------------------------------------------- /resources/views/ssh/services/process-manager/supervisor/stop-worker.blade.php: -------------------------------------------------------------------------------- 1 | if ! sudo supervisorctl stop {{ $id }}:*; then 2 | echo 'VITO_SSH_ERROR' && exit 1 3 | fi 4 | -------------------------------------------------------------------------------- /resources/views/ssh/services/process-manager/supervisor/uninstall-supervisor.blade.php: -------------------------------------------------------------------------------- 1 | sudo service supervisor stop 2 | 3 | sudo DEBIAN_FRONTEND=noninteractive apt-get remove supervisor -y 4 | 5 | sudo rm -rf /etc/supervisor 6 | sudo rm -rf /var/log/supervisor 7 | sudo rm -rf /var/run/supervisor 8 | sudo rm -rf /var/run/supervisor/supervisor.sock 9 | -------------------------------------------------------------------------------- /resources/views/ssh/services/process-manager/supervisor/worker.blade.php: -------------------------------------------------------------------------------- 1 | [program:{{ $name }}] 2 | process_name=%(program_name)s_%(process_num)02d 3 | command={{ $command }} 4 | autostart={{ $autoStart }} 5 | autorestart={{ $autoRestart }} 6 | user={{ $user }} 7 | numprocs={{ $numprocs }} 8 | redirect_stderr=true 9 | stdout_logfile={{ $logFile }} 10 | stopwaitsecs=3600 11 | -------------------------------------------------------------------------------- /resources/views/ssh/services/redis/install.blade.php: -------------------------------------------------------------------------------- 1 | sudo DEBIAN_FRONTEND=noninteractive apt-get install redis-server -y 2 | 3 | sudo sed -i 's/bind 127.0.0.1 ::1/bind 0.0.0.0/g' /etc/redis/redis.conf 4 | 5 | sudo service redis enable 6 | 7 | sudo service redis start 8 | -------------------------------------------------------------------------------- /resources/views/ssh/services/redis/uninstall.blade.php: -------------------------------------------------------------------------------- 1 | sudo service redis stop 2 | 3 | sudo DEBIAN_FRONTEND=noninteractive apt-get remove redis-server -y 4 | 5 | sudo rm -rf /etc/redis 6 | sudo rm -rf /var/lib/redis 7 | sudo rm -rf /var/log/redis 8 | sudo rm -rf /var/run/redis 9 | sudo rm -rf /var/run/redis/redis-server.pid 10 | sudo rm -rf /var/run/redis/redis-server.sock 11 | sudo rm -rf /var/run/redis/redis-server.sock 12 | 13 | sudo DEBIAN_FRONTEND=noninteractive sudo apt-get autoremove -y 14 | 15 | sudo DEBIAN_FRONTEND=noninteractive sudo apt-get autoclean -y 16 | -------------------------------------------------------------------------------- /resources/views/ssh/services/webserver/caddy/caddy-systemd.blade.php: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Caddy web server 3 | Documentation=https://caddyserver.com/docs/ 4 | After=network.target network-online.target 5 | Requires=network-online.target 6 | 7 | [Service] 8 | Type=notify 9 | ExecStart=/usr/bin/caddy run --environ --config /etc/caddy/Caddyfile 10 | ExecReload=/usr/bin/caddy reload --config /etc/caddy/Caddyfile 11 | TimeoutStopSec=5s 12 | LimitNOFILE=1048576 13 | LimitNPROC=512 14 | PrivateTmp=true 15 | ProtectSystem=full 16 | AmbientCapabilities=CAP_NET_BIND_SERVICE 17 | 18 | [Install] 19 | WantedBy=multi-user.target -------------------------------------------------------------------------------- /resources/views/ssh/services/webserver/caddy/change-php-version.blade.php: -------------------------------------------------------------------------------- 1 | if ! sudo sed -i 's/php{{ $oldVersion }}/php{{ $newVersion }}/g' /etc/caddy/sites-available/{{ $domain }}; then 2 | echo 'VITO_SSH_ERROR' && exit 1 3 | fi 4 | 5 | if ! sudo service caddy restart; then 6 | echo 'VITO_SSH_ERROR' && exit 1 7 | fi 8 | 9 | echo "PHP Version Changed to {{ $newVersion }}" 10 | -------------------------------------------------------------------------------- /resources/views/ssh/services/webserver/caddy/create-custom-ssl.blade.php: -------------------------------------------------------------------------------- 1 | if ! sudo mkdir -p {{ $path }}; then 2 | echo 'VITO_SSH_ERROR' && exit 1 3 | fi 4 | 5 | if ! echo "{{ $certificate }}" | sudo tee {{ $certificatePath }}; then 6 | echo 'VITO_SSH_ERROR' && exit 1 7 | fi 8 | 9 | if ! echo "{{ $pk }}" | sudo tee {{ $pkPath }}; then 10 | echo 'VITO_SSH_ERROR' && exit 1 11 | fi 12 | 13 | echo "Successfully received certificate." 14 | -------------------------------------------------------------------------------- /resources/views/ssh/services/webserver/caddy/create-path.blade.php: -------------------------------------------------------------------------------- 1 | export DEBIAN_FRONTEND=noninteractive 2 | 3 | rm -rf {{ $path }} 4 | 5 | mkdir {{ $path }} 6 | 7 | chmod -R 755 {{ $path }} 8 | -------------------------------------------------------------------------------- /resources/views/ssh/services/webserver/caddy/create-vhost.blade.php: -------------------------------------------------------------------------------- 1 | if ! sudo ln -s /etc/caddy/sites-available/{{ $domain }} /etc/caddy/sites-enabled/; then 2 | echo 'VITO_SSH_ERROR' && exit 1 3 | fi 4 | 5 | if ! sudo service caddy restart; then 6 | echo 'VITO_SSH_ERROR' && exit 1 7 | fi 8 | -------------------------------------------------------------------------------- /resources/views/ssh/services/webserver/caddy/delete-site.blade.php: -------------------------------------------------------------------------------- 1 | rm -rf {{ $path }} 2 | 3 | sudo rm /etc/caddy/sites-available/{{ $domain }} 4 | 5 | sudo rm /etc/caddy/sites-enabled/{{ $domain }} 6 | 7 | echo "Site deleted" 8 | -------------------------------------------------------------------------------- /resources/views/ssh/services/webserver/caddy/get-vhost.blade.php: -------------------------------------------------------------------------------- 1 | cat /etc/caddy/sites-available/{{ $domain }} -------------------------------------------------------------------------------- /resources/views/ssh/services/webserver/caddy/redirects.blade.php: -------------------------------------------------------------------------------- 1 | @foreach($site->activeRedirects as $redirect) 2 | redir {{ $redirect->from }} {{ $redirect->to }} {{ $redirect->mode }} 3 | @endforeach 4 | -------------------------------------------------------------------------------- /resources/views/ssh/services/webserver/caddy/uninstall-caddy.blade.php: -------------------------------------------------------------------------------- 1 | sudo service caddy stop 2 | 3 | sudo DEBIAN_FRONTEND=noninteractive sudo apt remove caddy -y 4 | 5 | sudo rm -rf /etc/caddy 6 | sudo rm -rf /var/log/caddy 7 | sudo rm -rf /var/lib/caddy 8 | sudo rm -rf /var/cache/caddy 9 | sudo rm -rf /usr/share/caddy 10 | sudo rm -rf /etc/systemd/system/caddy.service 11 | 12 | sudo systemctl daemon-reload 13 | -------------------------------------------------------------------------------- /resources/views/ssh/services/webserver/nginx/change-php-version.blade.php: -------------------------------------------------------------------------------- 1 | if ! sudo sed -i 's/php{{ $oldVersion }}/php{{ $newVersion }}/g' /etc/nginx/sites-available/{{ $domain }}; then 2 | echo 'VITO_SSH_ERROR' && exit 1 3 | fi 4 | 5 | if ! sudo service nginx restart; then 6 | echo 'VITO_SSH_ERROR' && exit 1 7 | fi 8 | 9 | echo "PHP Version Changed to {{ $newVersion }}" 10 | -------------------------------------------------------------------------------- /resources/views/ssh/services/webserver/nginx/create-custom-ssl.blade.php: -------------------------------------------------------------------------------- 1 | if ! sudo mkdir -p {{ $path }}; then 2 | echo 'VITO_SSH_ERROR' && exit 1 3 | fi 4 | 5 | if ! echo "{{ $certificate }}" | sudo tee {{ $certificatePath }}; then 6 | echo 'VITO_SSH_ERROR' && exit 1 7 | fi 8 | 9 | if ! echo "{{ $pk }}" | sudo tee {{ $pkPath }}; then 10 | echo 'VITO_SSH_ERROR' && exit 1 11 | fi 12 | 13 | echo "Successfully received certificate." 14 | -------------------------------------------------------------------------------- /resources/views/ssh/services/webserver/nginx/create-letsencrypt-ssl.blade.php: -------------------------------------------------------------------------------- 1 | if ! sudo certbot certonly --force-renewal --nginx --noninteractive --agree-tos --cert-name {{ $name }} -m {{ $email }} {{ $domains }} --verbose; then 2 | echo 'VITO_SSH_ERROR' && exit 1 3 | fi 4 | -------------------------------------------------------------------------------- /resources/views/ssh/services/webserver/nginx/create-path.blade.php: -------------------------------------------------------------------------------- 1 | export DEBIAN_FRONTEND=noninteractive 2 | 3 | rm -rf {{ $path }} 4 | 5 | mkdir {{ $path }} 6 | 7 | chmod -R 755 {{ $path }} 8 | -------------------------------------------------------------------------------- /resources/views/ssh/services/webserver/nginx/create-vhost.blade.php: -------------------------------------------------------------------------------- 1 | if ! sudo ln -s /etc/nginx/sites-available/{{ $domain }} /etc/nginx/sites-enabled/; then 2 | echo 'VITO_SSH_ERROR' && exit 1 3 | fi 4 | 5 | if ! sudo service nginx restart; then 6 | echo 'VITO_SSH_ERROR' && exit 1 7 | fi 8 | -------------------------------------------------------------------------------- /resources/views/ssh/services/webserver/nginx/delete-site.blade.php: -------------------------------------------------------------------------------- 1 | rm -rf {{ $path }} 2 | 3 | sudo rm /etc/nginx/sites-available/{{ $domain }} 4 | 5 | sudo rm /etc/nginx/sites-enabled/{{ $domain }} 6 | 7 | echo "Site deleted" 8 | -------------------------------------------------------------------------------- /resources/views/ssh/services/webserver/nginx/get-vhost.blade.php: -------------------------------------------------------------------------------- 1 | cat /etc/nginx/sites-available/{{ $domain }} 2 | -------------------------------------------------------------------------------- /resources/views/ssh/services/webserver/nginx/install-nginx.blade.php: -------------------------------------------------------------------------------- 1 | sudo DEBIAN_FRONTEND=noninteractive apt-get install nginx -y 2 | 3 | # install certbot 4 | sudo DEBIAN_FRONTEND=noninteractive apt-get install certbot python3-certbot-nginx -y 5 | -------------------------------------------------------------------------------- /resources/views/ssh/services/webserver/nginx/redirects.blade.php: -------------------------------------------------------------------------------- 1 | @foreach($site->activeRedirects as $redirect) 2 | location = {{ $redirect->from }} { 3 | return {{ $redirect->mode }} {{ $redirect->to }}; 4 | } 5 | @endforeach 6 | -------------------------------------------------------------------------------- /resources/views/ssh/services/webserver/nginx/uninstall-nginx.blade.php: -------------------------------------------------------------------------------- 1 | sudo service nginx stop 2 | 3 | sudo DEBIAN_FRONTEND=noninteractive apt-get purge nginx nginx-common nginx-full -y 4 | 5 | sudo rm -rf /etc/nginx 6 | sudo rm -rf /var/log/nginx 7 | sudo rm -rf /var/lib/nginx 8 | sudo rm -rf /var/cache/nginx 9 | sudo rm -rf /usr/share/nginx 10 | sudo rm -rf /etc/systemd/system/nginx.service 11 | 12 | sudo systemctl daemon-reload 13 | -------------------------------------------------------------------------------- /resources/views/ssh/storage/dropbox/delete-file.blade.php: -------------------------------------------------------------------------------- 1 | curl --location --request POST 'https://api.dropboxapi.com/2/files/delete_v2' \ 2 | --header 'Authorization: Bearer {{ $token }}' \ 3 | --header 'Content-Type: application/json' \ 4 | --data-raw '{ 5 | "path": "{{ $src }}" 6 | }' 7 | -------------------------------------------------------------------------------- /resources/views/ssh/storage/dropbox/download.blade.php: -------------------------------------------------------------------------------- 1 | curl -o {{ $dest }} --location --request POST 'https://content.dropboxapi.com/2/files/download' \ 2 | --header 'Accept: application/json' \ 3 | --header 'Dropbox-API-Arg: {"path":"{{ $src }}"}' \ 4 | --header 'Authorization: Bearer {{ $token }}' 5 | -------------------------------------------------------------------------------- /resources/views/ssh/storage/dropbox/upload.blade.php: -------------------------------------------------------------------------------- 1 | curl -sb --location --request POST 'https://content.dropboxapi.com/2/files/upload' \ 2 | --header 'Accept: application/json' \ 3 | --header 'Dropbox-API-Arg: {"path":"{{ $dest }}"}' \ 4 | --header 'Content-Type: text/plain; charset=dropbox-cors-hack' \ 5 | --header 'Authorization: Bearer {{ $token }}' \ 6 | --data-binary '@{{ $src }}' 7 | -------------------------------------------------------------------------------- /resources/views/ssh/storage/ftp/delete-file.blade.php: -------------------------------------------------------------------------------- 1 | curl {{ $passive }} -u "{{ $username }}:{{ $password }}" ftp{{ $ssl }}://{{ $host }}:{{ $port }}/{{ $src }} -Q "DELE /{{ $src }}" 2 | -------------------------------------------------------------------------------- /resources/views/ssh/storage/ftp/download.blade.php: -------------------------------------------------------------------------------- 1 | curl {{ $passive }} -u "{{ $username }}:{{ $password }}" ftp{{ $ssl }}://{{ $host }}:{{ $port }}/{{ $src }} -o "{{ $dest }}" 2 | -------------------------------------------------------------------------------- /resources/views/ssh/storage/ftp/upload.blade.php: -------------------------------------------------------------------------------- 1 | curl {{ $passive }} -T "{{ $src }}" -u "{{ $username }}:{{ $password }}" ftp{{ $ssl }}://{{ $host }}:{{ $port }}/{{ $dest }} 2 | -------------------------------------------------------------------------------- /resources/views/ssh/storage/local/download.blade.php: -------------------------------------------------------------------------------- 1 | cp {{ $src }} {{ $dest }} 2 | -------------------------------------------------------------------------------- /resources/views/ssh/storage/local/upload.blade.php: -------------------------------------------------------------------------------- 1 | mkdir -p {{ $destDir }} 2 | cp {{ $src }} {{ $destFile }} 3 | -------------------------------------------------------------------------------- /scripts/post-update.sh: -------------------------------------------------------------------------------- 1 | # post-update script is here to cover extra commands in case of an update requires it. 2 | echo "Running post-update script..." 3 | -------------------------------------------------------------------------------- /scripts/update.sh: -------------------------------------------------------------------------------- 1 | echo "Updating Vito..." 2 | 3 | cd /home/vito/vito 4 | 5 | echo "Pulling changes..." 6 | git fetch --all 7 | 8 | echo "Checking out the latest tag..." 9 | NEW_RELEASE=$(git tag -l "2.*" --sort=-v:refname | head -n 1) 10 | git checkout "$NEW_RELEASE" 11 | 12 | git pull origin "$NEW_RELEASE" 13 | 14 | echo "Installing composer dependencies..." 15 | composer install --no-dev 16 | 17 | echo "Running migrations..." 18 | php artisan migrate --force 19 | 20 | echo "Optimizing..." 21 | php artisan optimize:clear 22 | php artisan optimize 23 | 24 | echo "Restarting workers..." 25 | sudo supervisorctl restart worker:* 26 | 27 | bash scripts/post-update.sh 28 | 29 | echo "Vito updated successfully to $NEW_RELEASE! 🎉" 30 | -------------------------------------------------------------------------------- /storage/app/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !public/ 3 | !.gitignore 4 | -------------------------------------------------------------------------------- /storage/app/public/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/.gitignore: -------------------------------------------------------------------------------- 1 | compiled.php 2 | config.php 3 | down 4 | events.scanned.php 5 | maintenance.php 6 | routes.php 7 | routes.scanned.php 8 | schedule-* 9 | services.json 10 | -------------------------------------------------------------------------------- /storage/framework/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !data/ 3 | !.gitignore 4 | -------------------------------------------------------------------------------- /storage/framework/cache/data/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/sessions/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/testing/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/views/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/logs/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /tests/CreatesApplication.php: -------------------------------------------------------------------------------- 1 | make(Kernel::class)->bootstrap(); 18 | 19 | return $app; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /tests/Unit/NotificationChannels/TestNotification.php: -------------------------------------------------------------------------------- 1 |