├── public
├── favicon.ico
├── css
│ └── .gitignore
├── js
│ └── .gitignore
├── robots.txt
├── mix-manifest.json
└── fonts
│ └── vendor
│ └── bootstrap-sass
│ └── bootstrap
│ ├── glyphicons-halflings-regular.eot
│ ├── glyphicons-halflings-regular.ttf
│ ├── glyphicons-halflings-regular.woff
│ └── glyphicons-halflings-regular.woff2
├── database
├── .gitignore
├── migrations
│ ├── 2014_10_12_100000_create_password_resets_table.php
│ ├── 2017_04_28_160656_create_project_users_table.php
│ ├── 2017_04_03_193949_create_server_providers_table.php
│ ├── 2017_04_26_163353_create_source_providers_table.php
│ ├── 2017_03_31_172929_create_environments_table.php
│ ├── 2017_05_10_203142_create_alerts_table.php
│ ├── 2017_06_14_151436_create_stack_databases_table.php
│ ├── 2017_04_27_193631_create_jobs_table.php
│ ├── 2017_05_08_175021_create_ip_addresses_table.php
│ ├── 2017_03_31_170538_create_projects_table.php
│ ├── 2017_07_29_024811_create_certificates_table.php
│ ├── 2017_05_10_150545_create_failed_jobs_table.php
│ ├── 2017_08_02_155914_create_storage_providers_table.php
│ ├── 2017_06_11_154558_create_daemon_generations_table.php
│ ├── 2017_08_10_151936_create_hooks_table.php
│ ├── 2014_10_12_000000_create_users_table.php
│ ├── 2017_07_31_191305_create_stack_tasks_table.php
│ ├── 2017_04_10_190135_create_balancers_table.php
│ └── 2017_04_18_203351_create_tasks_table.php
├── factories
│ ├── CertificateFactory.php
│ ├── StackTaskFactory.php
│ ├── SourceProviderFactory.php
│ ├── IpAddressFactory.php
│ ├── HookFactory.php
│ ├── EnvironmentFactory.php
│ ├── DatabaseRestoreFactory.php
│ ├── BalancerFactory.php
│ ├── ServerProviderFactory.php
│ ├── ServerTaskFactory.php
│ ├── ServerDeploymentFactory.php
│ ├── ProjectFactory.php
│ ├── DatabaseBackupFactory.php
│ ├── WebServerFactory.php
│ ├── DeploymentFactory.php
│ ├── StorageProviderFactory.php
│ ├── TaskFactory.php
│ ├── DatabaseFactory.php
│ ├── WorkerServerFactory.php
│ ├── AppServerFactory.php
│ ├── UserFactory.php
│ └── StackFactory.php
└── seeds
│ └── DatabaseSeeder.php
├── bootstrap
├── cache
│ └── .gitignore
└── autoload.php
├── storage
├── logs
│ └── .gitignore
├── app
│ ├── keys
│ │ └── .gitignore
│ ├── public
│ │ └── .gitignore
│ ├── scripts
│ │ └── .gitignore
│ └── .gitignore
└── framework
│ ├── cache
│ └── .gitignore
│ ├── testing
│ └── .gitignore
│ ├── views
│ └── .gitignore
│ ├── sessions
│ └── .gitignore
│ └── .gitignore
├── routes
├── schedule.php
├── web.php
├── channels.php
└── console.php
├── resources
├── views
│ ├── scripts
│ │ ├── scheduler
│ │ │ ├── stop.blade.php
│ │ │ └── start.blade.php
│ │ ├── caddy-configuration
│ │ │ ├── redirect.blade.php
│ │ │ ├── proxy.blade.php
│ │ │ └── app.blade.php
│ │ ├── daemon
│ │ │ ├── start.blade.php
│ │ │ ├── pause.blade.php
│ │ │ ├── unpause.blade.php
│ │ │ ├── restart.blade.php
│ │ │ ├── stop.blade.php
│ │ │ └── activate.blade.php
│ │ ├── provisionable
│ │ │ ├── removeKey.blade.php
│ │ │ └── addKey.blade.php
│ │ ├── database
│ │ │ ├── provision.blade.php
│ │ │ ├── network.blade.php
│ │ │ └── backup.blade.php
│ │ ├── php
│ │ │ ├── www.conf
│ │ │ ├── cli.ini
│ │ │ └── fpm.ini
│ │ ├── server
│ │ │ └── sync.blade.php
│ │ ├── tools
│ │ │ ├── chown.blade.php
│ │ │ └── callback.blade.php
│ │ ├── node
│ │ │ └── install.blade.php
│ │ ├── worker
│ │ │ └── provision.blade.php
│ │ ├── storage-provider-configuration
│ │ │ └── s3.blade.php
│ │ ├── balancer
│ │ │ ├── sync.blade.php
│ │ │ └── provision.blade.php
│ │ ├── deployment
│ │ │ └── activate.blade.php
│ │ └── caddy
│ │ │ └── install.blade.php
│ ├── mail
│ │ ├── balancer
│ │ │ └── provisioned.blade.php
│ │ ├── stack
│ │ │ └── provisioned.blade.php
│ │ └── database
│ │ │ └── provisioned.blade.php
│ ├── home.blade.php
│ └── projects
│ │ └── index.blade.php
├── assets
│ ├── sass
│ │ ├── app.scss
│ │ └── _variables.scss
│ └── js
│ │ ├── root.js
│ │ ├── app.js
│ │ └── components
│ │ └── ProjectList.vue
└── lang
│ └── en
│ ├── pagination.php
│ ├── auth.php
│ └── passwords.php
├── app
├── Policies
│ ├── ServerPolicy.php
│ ├── AppServerPolicy.php
│ ├── WebServerPolicy.php
│ ├── WorkerServerPolicy.php
│ ├── DatabaseRestorePolicy.php
│ ├── BalancerPolicy.php
│ ├── DatabaseBackupPolicy.php
│ ├── EnvironmentPolicy.php
│ ├── DatabasePolicy.php
│ └── StackPolicy.php
├── Exceptions
│ ├── AlreadyDeployingException.php
│ ├── StackProvisioningTimeout.php
│ ├── ProvisioningTimeout.php
│ └── ManifestNotFoundException.php
├── MemoizesMethods.php
├── Contracts
│ ├── HasStack.php
│ ├── Alertable.php
│ ├── YamlParser.php
│ ├── StackDefinition.php
│ └── DnsProvider.php
├── Collaborator.php
├── DaemonGeneration.php
├── Listeners
│ ├── CreateAlert.php
│ ├── ResetDeploymentStatus.php
│ ├── CheckPendingDeployments.php
│ ├── TrimAlertsForProject.php
│ └── UpdateLastAlertTimestampForCollaborators.php
├── Http
│ ├── Controllers
│ │ ├── ScheduleController.php
│ │ ├── Controller.php
│ │ ├── API
│ │ │ ├── ServerConfigurationController.php
│ │ │ ├── OwnedProjectsController.php
│ │ │ ├── ProjectSizeController.php
│ │ │ ├── ServerProviderSizeController.php
│ │ │ ├── ServerProviderRegionController.php
│ │ │ ├── CancelsDeployments.php
│ │ │ ├── SshBalancerController.php
│ │ │ ├── LoginController.php
│ │ │ ├── SshDatabaseController.php
│ │ │ ├── LastDeploymentController.php
│ │ │ ├── StackServerController.php
│ │ │ ├── CallbackController.php
│ │ │ ├── EnvironmentHookController.php
│ │ │ ├── StackSshServerController.php
│ │ │ ├── StackTaskController.php
│ │ │ ├── DatabaseTransferController.php
│ │ │ └── MaintenancedStackController.php
│ │ ├── ProjectController.php
│ │ └── Auth
│ │ │ ├── ForgotPasswordController.php
│ │ │ ├── LoginController.php
│ │ │ └── ResetPasswordController.php
│ ├── Middleware
│ │ ├── EncryptCookies.php
│ │ ├── VerifyCsrfToken.php
│ │ ├── TrimStrings.php
│ │ └── RedirectIfAuthenticated.php
│ └── Requests
│ │ └── CreateHookRequest.php
├── Callbacks
│ ├── MarkAsProvisioned.php
│ ├── Dispatch.php
│ ├── CheckBuild.php
│ ├── CheckActivation.php
│ ├── CheckServerTask.php
│ ├── CheckDatabaseRestore.php
│ └── CheckDatabaseBackup.php
├── Jobs
│ ├── StopDaemons.php
│ ├── PauseDaemons.php
│ ├── ProvisionAppServer.php
│ ├── ProvisionWebServer.php
│ ├── StartDaemons.php
│ ├── UnpauseDaemons.php
│ ├── ProvisionWorkerServer.php
│ ├── RestartDaemons.php
│ ├── PruneTasks.php
│ ├── PruneStackTasks.php
│ ├── HandlesStackProvisioningFailures.php
│ ├── ProvisionBalancer.php
│ ├── ProvisionDatabase.php
│ ├── RunStackTask.php
│ ├── SyncServers.php
│ ├── SyncStackNetwork.php
│ ├── SyncBalancers.php
│ ├── SyncServer.php
│ ├── AddDnsRecord.php
│ ├── SyncBalancer.php
│ └── FinishTask.php
├── Scripts
│ ├── Sleep.php
│ ├── WriteDummyFile.php
│ ├── StopDaemons.php
│ ├── PauseDaemons.php
│ ├── StartDaemons.php
│ ├── UnpauseDaemons.php
│ ├── ProvisioningScript.php
│ ├── GetCurrentDirectory.php
│ ├── GetAptLockStatus.php
│ ├── ProvisionBalancer.php
│ ├── Script.php
│ ├── DaemonScript.php
│ ├── WritesCaddyServerConfigurations.php
│ └── ProvisionDatabase.php
├── Services
│ └── LocalYamlParser.php
├── DeterminesAge.php
├── Providers
│ └── BroadcastServiceProvider.php
├── WebServerRecordCreator.php
├── WorkerServerRecordCreator.php
├── IpAddress.php
├── StorageProviderClientFactory.php
├── Events
│ ├── StackTaskFailed.php
│ ├── StackTaskFinished.php
│ ├── StackTaskRunning.php
│ ├── ServerTaskFailed.php
│ ├── ServerTaskFinished.php
│ ├── DatabaseBackupFailed.php
│ ├── DatabaseBackupFinished.php
│ ├── DatabaseBackupRunning.php
│ ├── DatabaseRestoreFailed.php
│ ├── DatabaseRestoreRunning.php
│ ├── DatabaseRestoreFinished.php
│ ├── ServerDeploymentBuilt.php
│ ├── ServerDeploymentFailed.php
│ ├── ServerDeploymentActivated.php
│ ├── ProjectShared.php
│ ├── ProjectUnshared.php
│ ├── AlertCreated.php
│ ├── StackProvisioning.php
│ ├── DeploymentActivating.php
│ ├── DeploymentBuilding.php
│ └── StackDeleting.php
├── ServerProviderClientFactory.php
├── SourceProviderClientFactory.php
├── Prunable.php
├── AppServerRecordCreator.php
├── ShellOutput.php
├── StackMetadata.php
├── TaskFactory.php
├── ShellResponse.php
├── Mail
│ ├── StackProvisioned.php
│ ├── BalancerProvisioned.php
│ └── DatabaseProvisioned.php
├── Certificate.php
├── Console
│ └── Kernel.php
├── Rules
│ ├── StackIsPromotable.php
│ └── ValidAppServerStack.php
└── Alert.php
├── .gitattributes
├── .gitignore
├── Makefile
├── tests
├── Unit
│ └── ExampleTest.php
├── Fakes
│ └── FakeTask.php
├── CreatesApplication.php
└── Feature
│ ├── SyncBalancerScriptTest.php
│ ├── ScheduleControllerTest.php
│ ├── StoreDatabaseBackupScriptTest.php
│ ├── ProvisionDatabaseScriptTest.php
│ ├── ProvisionAppServerScriptTest.php
│ ├── ProvisionBalancerScriptTest.php
│ ├── BuildScriptTest.php
│ ├── ActivateScriptTest.php
│ ├── ReportHelperTest.php
│ ├── EnvironmentTest.php
│ ├── RestoreDatabaseBackupScriptTest.php
│ ├── DeleteServerOnProviderJobTest.php
│ ├── ServerConfigurationControllerTest.php
│ ├── ValidDatabaseNameRuleTest.php
│ └── HandlesStackProvisioningFailuresTest.php
├── readme.md
├── webpack.mix.js
├── .env.example
├── helpers.php
├── config
└── view.php
└── package.json
/public/favicon.ico:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/database/.gitignore:
--------------------------------------------------------------------------------
1 | *.sqlite
2 |
--------------------------------------------------------------------------------
/public/css/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/public/js/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/bootstrap/cache/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/storage/logs/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/public/robots.txt:
--------------------------------------------------------------------------------
1 | User-agent: *
2 | Disallow:
3 |
--------------------------------------------------------------------------------
/storage/app/keys/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/storage/app/public/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/storage/app/scripts/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/storage/framework/cache/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/storage/framework/testing/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/storage/framework/views/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/storage/framework/sessions/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/public/mix-manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "/js/app.js": "/js/app.js"
3 | }
--------------------------------------------------------------------------------
/storage/app/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !keys/
3 | !public/
4 | !scripts/
5 | !.gitignore
6 |
--------------------------------------------------------------------------------
/routes/schedule.php:
--------------------------------------------------------------------------------
1 | id !!}"
5 | sudo supervisorctl add daemon-{!! $generation->id !!}
6 |
--------------------------------------------------------------------------------
/public/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/clarkeash/laravel-cloud/HEAD/public/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.eot
--------------------------------------------------------------------------------
/public/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/clarkeash/laravel-cloud/HEAD/public/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.ttf
--------------------------------------------------------------------------------
/public/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/clarkeash/laravel-cloud/HEAD/public/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.woff
--------------------------------------------------------------------------------
/public/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/clarkeash/laravel-cloud/HEAD/public/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.woff2
--------------------------------------------------------------------------------
/resources/views/scripts/daemon/pause.blade.php:
--------------------------------------------------------------------------------
1 |
2 | # Pause The Daemons
3 |
4 | echo "Pausing Supervisor Group: daemon-{!! $generation->id !!}"
5 | sudo supervisorctl signal USR2 daemon-{!! $generation->id !!}:*
6 |
--------------------------------------------------------------------------------
/resources/views/scripts/daemon/unpause.blade.php:
--------------------------------------------------------------------------------
1 |
2 | # Unpause The Daemons
3 |
4 | echo "Unpausing Supervisor Group: daemon-{!! $generation->id !!}"
5 | sudo supervisorctl signal CONT daemon-{!! $generation->id !!}:*
6 |
--------------------------------------------------------------------------------
/resources/views/scripts/daemon/restart.blade.php:
--------------------------------------------------------------------------------
1 |
2 | # Write Fresh Supervisor Configuration
3 |
4 | {!! $script->daemonConfiguration() !!}
5 |
6 | # Reload Daemons & Stop & Remove Old Ones
7 |
8 | {!! $script->activateDaemons() !!}
9 |
--------------------------------------------------------------------------------
/resources/views/scripts/provisionable/removeKey.blade.php:
--------------------------------------------------------------------------------
1 |
2 | # Remove Key & Regenerate Keys File
3 |
4 | rm -f /home/cloud/.ssh/authorized_keys.d/{{ $name }}
5 |
6 | cat /home/cloud/.ssh/authorized_keys.d/* > /home/cloud/.ssh/authorized_keys
7 |
--------------------------------------------------------------------------------
/app/MemoizesMethods.php:
--------------------------------------------------------------------------------
1 | /home/cloud/.ssh/authorized_keys.d/{{ $name }} << EOF
5 | # {{ $name }}
6 | {{ $key }}
7 |
8 | EOF
9 |
10 | cat /home/cloud/.ssh/authorized_keys.d/* > /home/cloud/.ssh/authorized_keys
11 |
--------------------------------------------------------------------------------
/Makefile:
--------------------------------------------------------------------------------
1 | .PHONY: test share
2 |
3 | test:
4 | php vendor/bin/phpunit
5 |
6 | share:
7 | ngrok http "cloud.dev:80" -subdomain=laravel-cloud -host-header=rewrite
8 |
9 | fresh:
10 | php artisan migrate:fresh
11 | php artisan passport:install --force
12 | rm storage/app/keys/*
13 |
14 | default: test
15 |
--------------------------------------------------------------------------------
/resources/views/scripts/caddy-configuration/proxy.blade.php:
--------------------------------------------------------------------------------
1 | {!! $domain !!} {
2 | {!! $tls !!}
3 |
4 | redir 301 {
5 | if {scheme} is http
6 | / https://{host}{uri}
7 | }
8 |
9 | proxy / {!! implode(' ', $proxyTo) !!} {
10 | transparent
11 | insecure_skip_verify
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/tests/Unit/ExampleTest.php:
--------------------------------------------------------------------------------
1 | assertTrue(true);
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/resources/views/scripts/database/provision.blade.php:
--------------------------------------------------------------------------------
1 |
2 | export DEBIAN_FRONTEND=noninteractive
3 |
4 | # Run Base Script
5 |
6 | @include('scripts.provisionable.base')
7 |
8 | # Run Database Installation Script
9 |
10 | @include('scripts.database.install')
11 |
12 | # Make Sure Directories Have Correct Permissions
13 |
14 | @include('scripts.tools.chown')
15 |
--------------------------------------------------------------------------------
/resources/views/scripts/php/www.conf:
--------------------------------------------------------------------------------
1 | [www]
2 | user = cloud
3 | group = cloud
4 | listen = 127.0.0.1:9000
5 |
6 | listen.owner = cloud
7 | listen.group = cloud
8 | listen.mode = 0666
9 |
10 | pm = dynamic
11 | pm.max_children = 24
12 | pm.start_servers = 2
13 | pm.min_spare_servers = 1
14 | pm.max_spare_servers = 3
15 |
16 | request_terminate_timeout = 60
17 |
--------------------------------------------------------------------------------
/app/Collaborator.php:
--------------------------------------------------------------------------------
1 | 'json',
16 | ];
17 | }
18 |
--------------------------------------------------------------------------------
/app/DaemonGeneration.php:
--------------------------------------------------------------------------------
1 | belongsTo(Stack::class, 'stack_id');
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/app/Listeners/CreateAlert.php:
--------------------------------------------------------------------------------
1 | toAlert();
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/app/Http/Controllers/ScheduleController.php:
--------------------------------------------------------------------------------
1 | id !!}"
5 |
6 | nohup bash -c "sudo supervisorctl stop daemon-{!! $generation->id !!}:* && \
7 | sudo supervisorctl remove daemon-{!! $generation->id !!} && \
8 | rm /etc/supervisor/conf.d/daemon-{!! $generation->id !!}.conf" > /dev/null 2>&1 &
9 |
--------------------------------------------------------------------------------
/resources/views/scripts/server/sync.blade.php:
--------------------------------------------------------------------------------
1 |
2 | # Write Caddyfile For Server
3 |
4 | cat > /home/cloud/Caddyfile << EOF
5 | {!! $script->actualDomainConfiguration() !!}
6 | {!! $script->vanityDomainConfiguration() !!}
7 | EOF
8 |
9 | # Make Sure Directories Have Correct Permissions
10 |
11 | @include('scripts.tools.chown')
12 |
13 | # Restart Caddy
14 |
15 | supervisorctl signal USR1 caddy
16 |
--------------------------------------------------------------------------------
/app/Http/Middleware/EncryptCookies.php:
--------------------------------------------------------------------------------
1 | project->name }}" project.
5 | The server's credentials are:
6 |
7 | **Server Name:** {{ $balancer->name }}
8 |
9 | **Sudo Password:** {{ $balancer->sudo_password }}
10 |
11 | Thanks,
12 | {{ config('app.name') }}
13 | @endcomponent
14 |
--------------------------------------------------------------------------------
/app/Http/Middleware/VerifyCsrfToken.php:
--------------------------------------------------------------------------------
1 | stack()->resetDeploymentStatus();
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/app/Http/Controllers/Controller.php:
--------------------------------------------------------------------------------
1 | provisionable) {
18 | $task->provisionable->markAsProvisioned();
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/app/Http/Middleware/TrimStrings.php:
--------------------------------------------------------------------------------
1 | deployment);
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/app/Listeners/CheckPendingDeployments.php:
--------------------------------------------------------------------------------
1 | deployment->stack->deployPending();
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/app/Scripts/Sleep.php:
--------------------------------------------------------------------------------
1 | deployment);
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/app/Jobs/ProvisionAppServer.php:
--------------------------------------------------------------------------------
1 | provisionable = $provisionable;
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/app/Jobs/ProvisionWebServer.php:
--------------------------------------------------------------------------------
1 | provisionable = $provisionable;
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/app/Jobs/StartDaemons.php:
--------------------------------------------------------------------------------
1 | deployment);
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/app/Services/LocalYamlParser.php:
--------------------------------------------------------------------------------
1 | ranInBackground = true;
19 |
20 | return $this;
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/readme.md:
--------------------------------------------------------------------------------
1 | Laravel Cloud was an attempt to build a "Forge Pro" for applications that needed more robust load balancing and scaling features.
2 |
3 | This was eventually replaced by Laravel Vapor; however, I am open sourcing the code for review purposes since it is the only significant Laravel application I have written that I am able to open source.
4 |
5 | Again, this code is only for review. This code may not be used or deployed for any purpose without my consent.
6 |
--------------------------------------------------------------------------------
/app/Jobs/UnpauseDaemons.php:
--------------------------------------------------------------------------------
1 | deployment);
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/app/Jobs/ProvisionWorkerServer.php:
--------------------------------------------------------------------------------
1 | provisionable = $provisionable;
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/resources/views/scripts/node/install.blade.php:
--------------------------------------------------------------------------------
1 |
2 | # Install NodeJS
3 |
4 | curl --silent --location https://deb.nodesource.com/setup_8.x | bash -
5 | apt-get update
6 | sudo apt-get install -y --force-yes nodejs
7 |
8 | # Install Yarn
9 |
10 | curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
11 | echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
12 | sudo apt-get update && sudo apt-get install yarn
13 |
--------------------------------------------------------------------------------
/resources/views/scripts/php/cli.ini:
--------------------------------------------------------------------------------
1 | [PHP]
2 | engine = On
3 | error_reporting = E_ALL
4 | expose_php = On
5 | log_errors = On
6 | max_execution_time = 0
7 | max_input_time = -1
8 | memory_limit = 512M
9 | output_buffering = 4096
10 | register_argc_argv = Off
11 | request_order = "GP"
12 | short_open_tag = Off
13 | variables_order = "GPCS"
14 |
15 | [CLI Server]
16 | cli_server.color = On
17 |
18 | [Date]
19 | date.timezone = UTC
20 |
21 | [Assertion]
22 | zend.assertions = -1
23 |
--------------------------------------------------------------------------------
/app/DeterminesAge.php:
--------------------------------------------------------------------------------
1 | {$attribute}->lte(Carbon::now()->subMinutes(10));
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/resources/views/mail/stack/provisioned.blade.php:
--------------------------------------------------------------------------------
1 | @component('mail::message')
2 | # Stack Created
3 |
4 | A new stack has been created for the "{{ $stack->environment->project->name }}" project.
5 | The stack's credentials are:
6 |
7 | **Stack Name:** {{ $stack->name }}
8 |
9 | @foreach ($stack->allServers() as $server)
10 | **{{ $server->name }} Sudo Password:** {{ $server->sudo_password }}
11 |
12 | @endforeach
13 |
14 | Thanks,
15 | {{ config('app.name') }}
16 | @endcomponent
17 |
--------------------------------------------------------------------------------
/resources/views/scripts/scheduler/start.blade.php:
--------------------------------------------------------------------------------
1 |
2 | # Start The Scheduled Tasks
3 |
4 | rm -f /etc/cron.d/schedule-*
5 |
6 | @foreach ($deployment->schedule() as $name => $options)
7 | cat > /etc/cron.d/schedule-{{ $name }} << EOF
8 | SHELL=/bin/sh
9 | PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
10 |
11 | {{ $options['frequency'] }} {{ $options['user'] ?? 'cloud' }} {{ $options['command'] }} >> /home/cloud/schedule-{{ $name }}.log 2>&1
12 | EOF
13 | @endforeach
14 |
--------------------------------------------------------------------------------
/resources/views/scripts/worker/provision.blade.php:
--------------------------------------------------------------------------------
1 |
2 | export DEBIAN_FRONTEND=noninteractive
3 |
4 | # Run Base Script
5 |
6 | @include('scripts.provisionable.base')
7 |
8 | # Run PHP Installation Script
9 |
10 | @include('scripts.php.install')
11 |
12 | # Make Sure Directories Have Correct Permissions
13 |
14 | @include('scripts.tools.chown')
15 |
16 | # Run The Custom Scripts
17 |
18 | @foreach ($customScripts as $customScript)
19 | {!! $customScript !!}
20 |
21 | @endforeach
22 |
--------------------------------------------------------------------------------
/app/Scripts/WriteDummyFile.php:
--------------------------------------------------------------------------------
1 | /root/dummy';
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/resources/views/scripts/storage-provider-configuration/s3.blade.php:
--------------------------------------------------------------------------------
1 |
2 | mkdir -p /home/cloud/.aws
3 |
4 | # Write The Credentials File
5 |
6 | cat > /home/cloud/.aws/credentials << EOF
7 | [default]
8 | aws_access_key_id = {!! $provider->meta['key'] !!}
9 | aws_secret_access_key = {!! $provider->meta['secret'] !!}
10 | EOF
11 |
12 | # Write The Configuration File
13 |
14 | cat > /home/cloud/.aws/config << EOF
15 | [default]
16 | output = json
17 | region = {!! $provider->meta['region'] !!}
18 | EOF
19 |
--------------------------------------------------------------------------------
/tests/CreatesApplication.php:
--------------------------------------------------------------------------------
1 | make(Kernel::class)->bootstrap();
19 |
20 | return $app;
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/app/Providers/BroadcastServiceProvider.php:
--------------------------------------------------------------------------------
1 |
5 |