Skip to content
Parity 0.1.0
Menu

Coming from Squire's parity kit#

Parity grew up inside Squire as squire init --only=parity: a compose file, a .squire/ folder and two scripts. It moved out because people want to run Citadel locally without the rest of the deploy kit. Parity does the same job as one program, with nothing to copy into your app but parity.json.

Squire keeps its release files (build.sh, deployments/, scripts/release.sh, health.php): Citadel still needs them, and Parity runs them the way Citadel does. Only the parity kit is replaced.

The move#

In the folder with docker-compose.squire.yml (the app's root, or deploy/ when the kit lives there):

parity check
parity init --from-squire --print
parity init --from-squire
parity up
parity test

--print shows the parity.json it would write and the kit files it found, without writing anything.

What carries over#

Parity reads docker-compose.squire.yml, .env.squire.example and .env.squire, and carries these settings by name:

Squire setting parity.json field
SQUIRE_PROJECT name
SQUIRE_BASE_IMAGE image
SQUIRE_PUBLIC_DIR public_dir
SQUIRE_DEPLOYMENTS deployments
SQUIRE_TZ time_zone
SQUIRE_SERVER_NAME server_name
SQUIRE_ENVIRONMENT environment
SQUIRE_HTTP_PORT http_port
SQUIRE_DB_NAME, SQUIRE_DB_PORT database.name, database.port

What stays behind#

Every password, and every other variable. Parity notes their names and skips their values: nothing from .env.squire beyond the table above is read, stored or printed. Parity makes its own local MySQL passwords in .parity/, once, and keeps them.

The kit's files#

Parity lists them and deletes none. Once you are happy with Parity, you can remove them yourself:

  • docker-compose.squire.yml
  • .squire/ (Dockerfile, vhost.conf, php.ini, php-web.ini, haproxy.cfg, the fallback files)
  • scripts/parity.sh and scripts/parity.ps1

Look for anything in the README or CI that still runs them.

What to expect to differ#

  • php.ini. The kit ran a hardened php.ini of its own. Parity runs Citadel's own php.ini and vhost.conf, copied unchanged, because that is what Citadel runs. A setting the kit tightened may be looser here, as it is on Citadel.
  • The scheduler and the worker. The kit's portable scheduler and worker services become one cron entry, php artisan schedule:run every minute, because Citadel has cron and no services. The queue drains from the scheduler.
  • The image. The kit can build its own fallback base when Citadel's image is out of reach. Parity has no such path: it runs Citadel's own image only, so get it with parity image get before the first parity up.
  • Where things live. Everything Parity writes is in .parity/, which ignores itself in git and is rewritten on every parity up.