Skip to content
Parity 0.1.0
Menu

FAQ#

Short answers, with a link to the long one where there is one.

Do I need PHP or Composer on my computer?#

No. PHP, Apache and the extensions come from Citadel's image, inside the container. Composer runs where your build.sh runs it, inside the build, as on Citadel.

Is this the same as Squire?#

No, and they work together. Squire gets the app onto Citadel (build.sh, deployments/, release.sh). Parity runs Citadel on your computer, and runs those same files the way Citadel does. Parity used to be Squire's parity kit: Coming from Squire.

Does my app have to use the WELD stack?#

No. Parity depends on nothing in the stack. Any PHP app that runs on Citadel can use it, from a 2009 folder of PHP files to a current Laravel app.

Why not just use the official PHP image?#

Because Citadel does not. Citadel's image has its own users, modules, extensions, Oracle client and entrypoint, and its own php.ini. An app that works on the official image can still fail on Citadel. So Parity runs Citadel's own image, byte for byte, and nothing else. When Citadel has not published a download for a tag yet, Parity says so rather than run a look-alike (Citadel's images).

Can I connect to Oracle or Banner?#

Not with Parity's help. Parity ships no connectors, no credentials and no data. Citadel's image includes the Oracle client, so code that uses oci8 loads, but a local copy may point only at a test database its data owner approves, never production, and never real student or employee data on a laptop (FERPA).

How do I sign in locally?#

Set sign_in to fake in parity.json to use SESAME's fake driver, which signs you in as fake_user (jdoe unless you say otherwise) without CAS. Parity puts the settings in the app container's environment and never touches your .env. cas is for an app that must talk to the real CAS: it needs a wayne.edu server_name pointed at 127.0.0.1 in your hosts file and "https": true, so Parity serves https for server_name on 127.0.0.1:8443. Sign-in has the details.

How do I run a queue worker or a scheduled job?#

The way Citadel does: with a cron entry. Citadel has no worker service, so a Laravel app runs php artisan schedule:run every minute and drains its queue from the scheduler. parity init proposes that entry when the app schedules anything.

How do I build the front end?#

Citadel's images carry Node (22 in 8.5r3), so build in the app container, as the user who owns the code, the way a deployment script would on Citadel:

parity shell --user citadel sh -c 'npm ci && npm run build'

The built files land in your folder and Apache serves them on the next request. Vite's dev server and hot reload are not part of Citadel, so run npm run dev on your own computer if you want them.

Can my app use a second database?#

Not in 1.0. Parity runs one MySQL 5.6, as Citadel gives one database per app. An app that reads a second database (a one-time import from an older app, say) points that connection at a test copy its data owner approves, in its own settings.

What about HTTPS?#

Set "https": true in parity.json and Parity serves https for server_name (and localhost) on 127.0.0.1:8443, a fixed port, with a leaf from the app's own local CA: one CA per app, name-constrained to the app's names, kept in Parity's per-user config folder, its key never leaving it. The https frontend sends X-Forwarded-Proto: https; plain http on http_port keeps working. Run parity trust once per computer and the browser stops warning (on Linux it prints the sudo commands for your distro, and Firefox always takes a manual import). parity check then shows https.trust: OK when your user store trusts the CA, a warning with Fix: parity trust when it does not, and it never fails, so CI stays green. parity test loads the home page over https pinned to the app's CA, which a CI machine never trusts system-wide. Commands has the details.

Can I run two apps at once?#

Yes. Each app is its own compose project (parity-<name>). Give them different http_port values, and different database.port values if both use MySQL.

Where is my data?#

In a volume of the app's compose project. parity down keeps it; parity down --volumes empties it.

Can I use Parity in CI?#

Yes. Without a terminal it prints plain tags, and --json on check, status, test, image list and version is the stable contract. Exit codes are 0 pass, 1 findings or a failed test, 2 cannot run. A runner needs a container engine and Compose, and Citadel's image. Parity's own CI runs on runners that cannot fetch Citadel's image, so it builds a test-only image for its end-to-end job; that image is a fixture for Parity's tests, not something to run your app on.

Is there an app for people who never open a terminal?#

After 1.0: a desktop app with the same commands as buttons. Each button names the parity command it runs, so the app teaches the command line without asking anyone to use it. It is not released yet; the desktop app guide shows its screens from the work in progress.

Where do I report a problem?#

In the repository's issues on git.wayne.edu. Include the output of parity check --plain and parity version.