Local testing of deployment zipfile

Can be done via a Docker container running Apache2 with mod-rewrite enabled. There is a script which launches a Docker container serving the contents of a deployment zipfile, which can be used as in:

cd makesite/local-server
./serve-zipfile.sh "$zipfilename"

where the shell variable zipfilename has been set as in the previous section.

See the contents of serve-zipfile.sh for details of what happens.

This local copy of Pytch can be explored interactively by going to http://localhost:5888/, or tested via Cypress. The serve-zipfile.sh script writes (to stdout) a command-line which can be copy/pasted to launch Cypress with the correct CYPRESS_BASE_URL set.

A release zipfile will have in place the redirect from the root to the app, but for a beta release, you will have to manually navigate to the required subdirectory.

Including demo zipfiles

An optional second argument can be provided to serve-zipfile.sh. If given, it should name a zipfile containing demo zips within a build-id directory, which will be unzipped into a top-level directory demos of the webroot.