Patch for PaaS providers (Orchestra in particular) #277
+94
−33
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There's a couple of things in this pull request, take what you like (if you like any of it!) These are my alterations for a smooth installation process on http://orchestra.io.
Routing
I've added attempts to use Kohana-esque routing in the event that
__route__
is not set. This should mean routing "just works" for generalized PHP web server configurations.If
__route__
is set, nothing changes.Remove writable FS requirement
This boils down to making it optional whether the
configs/generated
directory is writable. During the setup process, a user can choose to ignore the warnings about thegenerated
directory not being writable. At the end of the setup, they are presented with instructions and a textarea containing the completed configuration ini for copying and pasting.If the
configs
directory is writable, there is no difference in the setup process.Get around common image caching configs
Changing the default
.jpg
ending on image requests to.jpe
should prevent mishandling of photos which might otherwise be treated as static assets.This is the only change which will affect all usage scenarios, but it is a fairly minor one, and should be invisible or easily remedied by users if they already have a solution in place.
These changes should help things run more smoothly out of the box on PaaS providers (Orchestra.io in particular) with negligible side-effects.
Here's the application running on Orchestra, for reference: http://openphoto.orchestra.io, configured with S3.
Questions, fire ahead! I'm also fairly new to OpenPhoto, so please excuse me if there's something you find particularly odd here.