2017 © Pedro Peláez
 

october-plugin oc-webartisan-plugin

Webartisan plugin for OctoberCMS

image

vojtasvoboda/oc-webartisan-plugin

Webartisan plugin for OctoberCMS

  • Friday, July 28, 2017
  • by VojtaSvoboda
  • Repository
  • 2 Watchers
  • 2 Stars
  • 1 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

Web Artisan plugin for OctoberCMS

Codacy Scrutinizer Coverage License, (*1)

Plugin allows you to run artisan commands by public URL. You can call this URL by http, curl or wget., (*2)

Example: http://www.domain.com/artisan/v1/cache/clear/secret-hash, (*3)

This could be useful:, (*4)

  • when you don't have SSH access to your server and wants to run some commands
  • when you don't have access to /etc/crontab and want to run scheduled tasks from outside
  • when you want to run scheduled tasks by online CRON tools like webcron.org etc.
  • when you want to run commands by services like IFTTT, Zapier, etc.
  • for deployment and automated tasks

Tested with the latest stable OctoberCMS build 419 (with Laravel 5.5)., (*5)

Important

It is highly recommend to use SSL (https://) when invoking commands with Web Artisan. The secret hash can be stolen if SSL is not used., (*6)

Configuration

Before call any command you have to set secret hash at Backend > Settings > System > Web Artisan. Run without secret hash is not possible due to security reasons., (*7)

For generating secret hash use some random generator., (*8)

Usage

General pattern is:, (*9)

http://www.domain.com/artisan/v1/{group}/{command}/{secret}, (*10)

Run command cache:clear by URL:, (*11)

http://www.domain.com/artisan/v1/cache/clear/1234567890abcdef, (*12)

Run command schedule:run by curl:, (*13)

curl http://www.domain.com/artisan/v1/schedule/run/1234567890abcdef, (*14)

Available commands

Whitelist: auth:clear-resets, cache:clear, october:update, queue:flush, queue:forget, queue:restart, queue:retry, queue:work, route:clear, schedule:run, view:clear., (*15)

Wants more? Override plugin's config file and add your commands as you wish., (*16)

Queued commands

You can queue commands so they are processed in the background by your queue workers. Before using this method, make sure you have configured your queue and are running a queue listener., (*17)

For running queue commands just put prefix queued before command, (*18)

http://www.domain.com/artisan/v1/queued/{group}/{command}/{secret}, (*19)

for example, (*20)

http://www.domain.com/artisan/v1/queued/october/update/1234567890abcdef, (*21)

TODO

  • [ ] pass Artisan to CommandRunner through constructor as Illuminate\Console\Application
  • [ ] set hash also by config (when you want to fire october:up on stage server)

Contributing

Please send Pull Request to the master branch., (*22)

License

Web artisan plugin is open-sourced software licensed under the MIT license same as OctoberCMS platform., (*23)

The Versions

28/07 2017

dev-master

9999999-dev https://github.com/vojtasvoboda/oc-webartisan-plugin

Webartisan plugin for OctoberCMS

  Sources   Download

MIT

The Requires

 

by Vojta Svoboda

plugin october webartisan

28/07 2017

1.0.3

1.0.3.0 https://github.com/vojtasvoboda/oc-webartisan-plugin

Webartisan plugin for OctoberCMS

  Sources   Download

MIT

The Requires

 

by Vojta Svoboda

plugin october webartisan

22/12 2016

1.0.2

1.0.2.0 https://github.com/vojtasvoboda/oc-webartisan-plugin

Webartisan plugin for OctoberCMS

  Sources   Download

MIT

The Requires

 

by Vojta Svoboda

plugin october webartisan

16/12 2016

1.0.1

1.0.1.0 https://github.com/vojtasvoboda/oc-webartisan-plugin

Reservations plugin for OctoberCMS

  Sources   Download

MIT

The Requires

 

by Vojta Svoboda

plugin october webartisan