Show HN: Hosty – Image/Text self-hosting for minimalists in PHP
bitbucket.org
bitbucket.org
I then looked around for existing, simple self-hosting tools, but all I found where huge near-community apps like Gallery2, Coppermine, ownCloud or ownstagram (with commenting, rating, folders, tags, ...) or PHP scripts from before there was PHP 5.
Long story short: None of them fit my need, so I built my own. It's based on Silex (Symfony2's micro-framework sister) and Twig and only offers the bare minimum. Files are placed in the local filesystem, a database is not needed. Apache2 is the default supported webserver, but we have Hosty in production using nginx over SSL as well.
Uploading is only allowed for registered users (and users have to be configured in a config file), viewing is allowed to anyone having the link to a file. It's not intended to be a public file hosting service, so do not try to add some public register form or something like that ;-)
Hosty can be used inside a LAN without Internet access; no external resources are being used. It's published under MIT and deliberately doesn't add any promotional links or "Created by Hosty" footers.
https://github.com/MediaCrush/MediaCrush
Building your own is easy and fun, though, I don't blame you.
(This is, by the way, no offense to this project at all! I just couldn’t resist to write this.)
Is this how people develop and deploy PHP stuff nowadays?
One of the few strengths of PHP is that there doesn't have to be a "build process."
You don't even have to compile CSS and JS, really, but I guess people aren't comfortable with js or css which isn't machine generated. Fair enough - there are benefits to that, but as general practice, it's needless complexity.
I made it more obvious in the readme that you do not need build tools to run Hosty. Seems like that confused a lot of people.
I would just not use grunt. I understand it's not required to run it, but even as a build dependency, unless you already have Node installed and running, it's a lot of overhead for relatively little benefit, I think.
Granted, the amount of friction involved depends on personal preference, and whatever environment you're working in, but why require a package manager in another language (and, potentially, the language itself) when one exists for the language you're actually deploying in?
You don't minify your production js?
Sure, to keep it simple you could download your JS and PHP deps once and bundle them all up in one nice zip. I think many apps provide a "dist" or "release" bundle (this one, in fact, does) in which you don't have to care about Composer, Bower or npm. However, to properly organize deps or define build processes for development, why not use some of the (frankly) common tools available?
It's funny how HN could see a simple unzip-and-go app and scoff "amateur hour hobby project". But if someone takes a more formal approach to their hobby app it can flip and scoff "over-engineered bloated setup".
Most of the build process is meant to create small, versioned files, so users don't need to download full jQuery/Bootstrap stuff. I would feel bad for not optimizing my assets.