Private composer package hosting with Satis

Host your own private packages with Satis

Image for blog post Private composer package hosting with Satis

Until recently I've generally had a few ways to get around the problem of using private package repos in composer projects. This usually involves either using a github repo directory like this:


{
    "require": {
        "cowshedworks/private-repo": "dev-master"
    },
    "repositories": [
        {
            "type": "vcs",
            "url":  "[email protected]:cowshedworks/private-repo.git"
        }
    ]
}

Or using a path repository type where you just dump the repo locally into the project and point composer to the filesystem path where it can find it.

This generally works pretty well for the projects I've built and worked on. However, we've recently had a requirement to break a project up into separate applications and a big part of this is going to involve packaging up parts of the logic so that it can be shared between the apps. Whilst the previous methods would still allow this, it seems a lot less grim to start hosting these packages in a way similar to packagist.

What are the options?

When it comes to hosting packages you've pretty much got 2 options. 

1. Use private packagist

2. Host the packages yourself using Satis

Private packagist would be my preference here, as I'd generally say that a Saas solution for a complicated and annoying problem like this is worth the money. However, I feel that private packagist at €59/month is too pricey for our requirements, it's a shame they don't have €20/month tier for low usage users like me, at €708/year it starts to look expensive when passing on to a single client's hosting costs.

So that leaves Satis... I'm currently setting this up and will add how it goes to this blog post very soon.

 

 

Photo by Dayne Topkin on Unsplash


Article Category Tags