tresbientech / drupack
Installs drupack, which serves a Drupal project with its own PHP and web server, into the project root.
Package info
github.com/tresbientech/drupack
Language:Go
Type:composer-plugin
pkg:composer/tresbientech/drupack
Requires
- php: >=8.1
- composer-plugin-api: ^2
- composer-runtime-api: ^2.2
- composer/semver: ^3
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
- dev-main
- 1.0.0-rc19
- 1.0.0-rc18
- 1.0.0-rc17
- 1.0.0-rc16
- 1.0.0-rc15
- 1.0.0-rc14
- 1.0.0-rc13
- 1.0.0-rc12
- 1.0.0-rc11
- 1.0.0-rc10
- 1.0.0-rc9
- 1.0.0-rc8
- 1.0.0-rc7
- 1.0.0-rc6
- 1.0.0-rc5
- 1.0.0-rc4
- 1.0.0-rc3
- 1.0.0-rc2
- 1.0.0-rc1
- 1.0.0-beta23
- 1.0.0-beta22
- 1.0.0-beta21
- 1.0.0-beta20
- 1.0.0-beta19
- 1.0.0-beta18
- 1.0.0-beta17
- 1.0.0-beta16
- 1.0.0-beta15
- 1.0.0-beta14
- 1.0.0-beta13
- 1.0.0-beta12
- 1.0.0-beta11
- 1.0.0-beta10
- 1.0.0-beta9
- 1.0.0-beta8
- 1.0.0-beta7
- 1.0.0-beta6
- 1.0.0-beta5
- 1.0.0-beta4
- 1.0.0-beta3
- 1.0.0-beta2
- 1.0.0-beta1
- 1.0.0-alpha12
- 1.0.0-alpha11
- 1.0.0-alpha10
- 1.0.0-alpha9
- 1.0.0-alpha8
- 1.0.0-alpha7
- 1.0.0-alpha6
- 1.0.0-alpha5
- 1.0.0-alpha4
- 1.0.0-alpha3
- 1.0.0-alpha2
- 1.0.0-alpha1
- 0.9.0
- 0.8.1
- 0.8.0
- 0.7.1
- 0.7.0
- 0.6.1
- 0.6.0
- 0.5.5
- 0.5.4
- 0.5.3
- 0.5.2
- 0.5.1
This package is auto-updated.
Last update: 2026-12-05 20:40:49 UTC
README
Drupack runs Drupal from a single executable that contains PHP, FrankenPHP and Caddy. It does two things:
drupackserves a Drupal project that you already have, with the project's own settings, database and Drush.- A build packs your Composer project into an executable of its own, which installs and serves the site with nothing else on the machine. Build your own site covers it.
From 1.0.0, the commands, options and settings of drupack stay the same in every 1.x release. Stability lists them. Packaged sites are experimental: a minor release may change the build, drupack.yml and Site data.
Serve a Drupal project you already have
Install drupack in the project's root on Linux or macOS with Apple silicon, then start it there:
cd path/to/your/project curl -fsSL https://drupack.tresbien.tech/install.sh | sh ./drupack
On Windows, in PowerShell:
cd path\to\your\project irm https://drupack.tresbien.tech/install.ps1 | iex .\drupack.exe
The script installs the build for your system into the current directory and checks the SHA-256 of what it downloads. A file that already matches stays. Each project has its own drupack, so each one stays on the version that it installed.
A Composer project can pin drupack instead:
composer require 'drupal/drupack:^1.0@RC'
./drupack
The package is a Composer plugin, which Composer prompts you to trust once. A y writes allow-plugins.drupal/drupack into composer.json. From then on, composer install and composer update install this system's build of the package's version, on a server too. A build that already matches stays. Commit that entry first when a deploy has no terminal. A project that runs drupack-install from its own scripts removes them.
drupack serves the project in the working directory on http://127.0.0.1:3787 and prints a login link that works one time. It continues to serve in the background, and drupack stop stops it. The project's settings.php has the settings for the database and the paths of the files. Drupack writes nothing into the project, apart from the composer install that a start runs after a yes or with --yes.
drupack composer installinstalls a fresh clone with the Composer thatdrupackcontains. On a terminal, a start of a fresh clone prompts you to run it first, anddrupack --yesruns it without a prompt.drupack composer create-project drupal/cms my-sitecreates a Drupal project, with no PHP on the machine. From inside it,../drupackserves it.drupack drush COMMANDruns the project's own Drush on the bundled PHP.drupack php SCRIPTruns the bundled PHP.drupack self-updateinstalls the newest release.
The engine executable lists every command and option.
Linux
A Linux release publishes two builds per processor, one for each C library. The install script takes the glibc build on a host with glibc 2.28 or later, and the musl build on any other host, Alpine included. DRUPACK_LIBC set to glibc or musl overrides the pick:
curl -fsSL https://drupack.tresbien.tech/install.sh | DRUPACK_LIBC=musl sh
composer install and composer update make the same pick, so a project on a chosen build sets DRUPACK_LIBC for them too.
Downloading by hand
The releases page lists every build as drupack-VERSION-TARGET. A Linux target without a suffix is the glibc build. A target with the -musl suffix is the musl build. A browser marks what it downloads, and the install scripts avoid both marks below.
- macOS Gatekeeper blocks a marked executable that has no Apple signature.
xattr -d com.apple.quarantine drupackclears the mark. - Windows SmartScreen displays "Windows protected your PC" the first time. Choose "More info", then "Run anyway".
Build your own site
A site repository contains a Composer project and a drupack.yml. A build turns it into one executable per platform, for Linux, macOS on Apple silicon and Windows. The build runs on GitHub, Gitea, GitLab or any CI that runs a container. A first start of that executable installs the site, and its data stays in one directory beside it.
Build your own site has the setup. The Drupacked Demo is a complete site built this way.
Read more
Run the engine as a service covers a server. It describes a systemd unit, an OpenRC service for Alpine, Drupal's cron and a proxy for HTTPS.
The reference for the command line covers:
- every option, command and environment variable of
drupackand of a built site - what stays the same in a 1.x release
- HTTPS and serving other computers
- the static export and the Mercure hub
- the cache that a release unpacks into
Verify a download
The install scripts check each download's SHA-256. For a file downloaded by hand, each release publishes checksums.txt:
sha256sum --ignore-missing -c checksums.txt
On Windows, compare the file's hash against its entry in checksums.txt:
(Get-FileHash drupack-VERSION-windows-amd64.exe -Algorithm SHA256).Hash.ToLower()
GitHub records where each file was built, and the GitHub CLI checks that record:
gh attestation verify drupack-VERSION-linux-amd64 --repo tresbientech/drupack
A release also has release.json, which contains the SHA-256 and size of every executable. It also has a CycloneDX inventory of the contents of the executable.
Contributing
CONTRIBUTING.md covers the build, the test suites and the release.