itsgoingd / clockwork

Clockwork - php dev tools in your browser - server-side component
https://underground.works/clockwork
MIT License
5.7k stars 320 forks source link

Share to self-hosted server #654

Closed h-sigma closed 4 weeks ago

h-sigma commented 1 year ago

Here I am, the person who has to request a self-hosted solution for anything that relies on a 3rd party ^^

The feature I'd like to request is to allow the clockwork share feature to be hooked to a self hosted server. Some reasons and benefits:

What would the effort required for that be like? And is this something you're even open to? I don't know how the share service server works.

itsgoingd commented 1 year ago

Hey, that's a perfectly reasonable request. :) The share feature was actually built with this use-case in mind, but it takes a bit of tinkering to make it work.

The share service itself is a simple open-source Laravel application. Unfortunately it's entirely undocumented, but if you are familiar with Laravel, you should not have much trouble to get it working. You might have to use an older PHP version though, as it hasn't been updated in a while. You can find it here - https://github.com/underground-works/clockwork-share

You will also have to build a custom version of the app/extension, since the sharing URL is configured as an env variable at build time. To do so, set VUE_APP_SHARING_URL to your own sharing service endpoint and follow the build instructions in the readme. You can find the source here - https://github.com/underground-works/clockwork-app/tree/v5

We can totally make this configurable in-app in future, but it will take a while, since there are no new releases planned for the near future.

itsgoingd commented 4 weeks ago

Clockwork 5.3 will include an ability to set a custom sharing URL in application settings.