Self-Hosted/Private Packagist
Wait!
What is Packagist?
What is Composer?
What does this have to do with Drupal?
Further reading:
- https://getcomposer.org/
- https://www.lullabot.com/articles/goodbye-drush-make-hello-composer
- https://pantheon.io/docs/composer-drupal-8/
- https://github.com/drupal-composer/drupal-project
- https://www.drupal.org/drupalorg/blog/drupalorgs-composer-endpoints-are-out-of-beta
Self-Hosted/Private Packagist
Pros:
- Less work to require projects
Cons:
- Another thing to setup/maintain
- Information disclosure
Basic Usage
cd /var/www/drupal8dev.ca
composer config repositories.bmd composer https://packagist.briarmoon.ca/
composer require my_org/my_base_module 1.0
cd web
drupal mi my_base_module
cd /var/www/drupal8dev.ca
nano composer.json
...
"repositories": [
{
"type": "vcs",
"url": "https://github.com/my_org/my_base_module"
}
],
...
composer require my_org/my_base_module 1.0
cd web
drupal mi my_base_module
Compared to:
6 Weeks Later
cd /var/www/drupal8dev.ca
composer require my_org/jumping_jacks 1.1
cd web
drupal mi jumping_jacks
cd /var/www/drupal8dev.ca
nano composer.json
...
"repositories": [
{
"type": "vcs",
"url": "https://github.com/my_org/jumping_jacks"
}
],
...
composer require my_org/jumping_jacks 1.0
cd web
drupal mi my_base_module
Compared to:
4 Basic Options
-
[free] Satis - The most simple option.
- No GUI but multiple external GUI options.
- [free] Packagist - The same base as the main packagist so pretty high server costs.
- [paid] Toran Proxy - Commercial alternative (self-hosted but supported).
- [paid] Private Packagist - new version of Toran Proxy, currently only SaaS but soon self-hosted version as well.
More Reading on the Options
- [free] Satis - https://github.com/composer/satis
- [free] Packagist - https://github.com/composer/packagist
- [paid] Toran Proxy - https://toranproxy.com/
- [paid] Private Packagist - https://packagist.com/
Satis GUI Options
-
Satis-Go: https://github.com/benschw/satis-go
- Last Update: May 2016
-
Satis GUI: https://github.com/bazo/satis-gui
- Last Update: November 2014
-
Satis Admin: https://github.com/yohang/satis-admin
- Last Update: August 2016
-
Packages: https://github.com/terramar-labs/packages
- Last Update: February 2016
-
Satisfy: https://github.com/ludofleury/satisfy
- Last Update: November 2016
-
SCP: https://github.com/realshadow/satis-control-panel
- Last Update: April 2016
Satis-Go
- https://github.com/benschw/satis-go
- Last update: May 2016
- Write Safe: Yes
- Documentation: http://txt.fliglio.com/satis-go/
- Documentation Quality: minimal.
- Server Load: minimal.
- UI Access: ?
- Webhooks: Yes
- Server: Built in
- Ease of use: Very
- Ease of setup: moderate
- Feature Level: minimal
Satis-Go

Satis-Gui
- https://github.com/bazo/satis-gui
- Last Update: November 2014
- Write Safe: Possibly.
- Documentation: Readme in repo.
- Documentation Quality: minimal.
- Server Load: minimal.
- UI Access: Username & Password.
- Webhooks: yes.
- Server: Whatever you use.
- Ease of use: Very
- Ease of setup: Easy
- Feature Level: minimal
Satis-Gui

Satis Admin
- https://github.com/yohang/satis-admin
- Last Update: August 2016
- Write Safe: ?
- Documentation: Readme in repo.
- Documentation Quality: minimal.
- Server Load: minimal.
- UI Access: HTTPAuth
- Webhooks: No.
- Server: Whatever you use.
- Ease of use: Very
- Ease of setup: Easy does require Node.js
- Feature Level: Low
Satis Admin

Satisfy
- https://github.com/ludofleury/satisfy
- Last Update: November 2016
- Write Safe: No
- Documentation: Readme in repository
- Documentation Quality: minimal.
- Server Load: minimal.
- UI Access: Username & Password
- Webhooks: no.
- Server: Whatever you use.
- Ease of use: Haven't Used.
- Ease of setup: ?
- Feature Level: minimal per readme.
Satis Control Panel (SCP)
- https://github.com/realshadow/satis-control-panel
- Last Update: April 2016
- Write Safe: Probably.
- Documentation: Readme in repository
- Documentation Quality: moderate.
- Server Load: low.
- UI Access: ?
- Webhooks: Yes.
- Server: Whatever you use.
- Ease of use: Haven't Use
- Ease of setup: Moderate+: Had errors &I didn't fully debug.
- Feature Level: Moderate+ per readme.
Packages
- https://github.com/terramar-labs/packages
- Last Update: February 2016
- Write Safe: Yes
- Documentation: http://docs.terramarlabs.com/packages/3.1/introduction
- Documentation Quality: moderate.
- Server Load: minimal-low.
- UI Access: Single user sign-on
- Webhooks: Yes, including specific for GitLab & GitHub.
- Server: Whatever you use.
- Ease of use: Very
- Ease of setup: moderate
- Feature Level: moderate
Packages


Packages
git clone https://github.com/terramar-labs/packages packages
cd packages
composer install
cp config.yml.dist config.yml
# Edit configuration as desired.
nano config.yml
bin/console orm:schema-tool:create
# You will need to provide the webserver process with write rights
# to some folders/files.
# Exact method depends your web-server, security and usage requirements.
# For my Ubuntu 16.10/Apache2.4 setup I use:
sudo chmod -R 555 .
sudo chown -R www-data:www-data database.sqlite web/index.html web/packages.json
logs/resque.log web/include .composer cache
sudo chmod -R 755 web/include web/packages.json .composer cache database.sqlite
# For webhooks to work properly, you will have to have Redis installed.
# and run the resque worker. See the documentation for more info.
# Start a resque worker
# For best permissions results, probably should run as your
# webserver user for example:
sudo -u www-data bin/console resque:worker:start
Installation
Packages

Usage:
- Add remote - only GitHub or Gitlab supported
- click 'sync'
- go to 'Packages'
- click 'edit' and enable Satis.
- click 'Update Package'
Now every push/tag event will trigger a build.
Note: Packages are not rebuilt on enable, only manually by cmd line or automatically triggered on push.
Packages
Notes (or annoyances):
- Has minimal configuration of the satis.json so any changes you want to make will have to be done via editing `src/Plugin/Satis/ConfigurationHelper.php` see https://getcomposer.org/doc/articles/handling-private-packages-with-satis.md
- Doesn't support one-off repositories or other code versioning plugins.
- Only one user account but that should be fine under most use cases.
Private Packagist
By Nick Wilde
Private Packagist
- 253