Deployment of pxl should be easy! It is just a static site after all. It works by:

  1. Configuring a webserver to host a directory of static assets.
  2. Uploading the generated HTML files to that webserver.

The webserver is only responsible for serving the HTML and CSS files that are generated by pxl. Photos are served by the storage service that you choose.

This allows uploads to be easy and fast. It also means that you can host pxl sites almost anywhere.

Example nginx config

The following configuration should give you an idea of how to set up the nginx web server for pxl sites.

server {
  listen 80;

  root /var/www/;

  index index.html;
  error_page 404 /404.html;

If you want to see how to expand this to be more production ready (TLS cert with auto renewal, privileged/unprivileged users, etc.), take a look at the open source Ansible playbooks that we use for our actual server.

Deploy command

There is a convenience pxl deploy command that you can use instead of writing your own code. It is quite simple and limited, but that should not matter.

If you hadn't configured deploy credentials before, please look at the Configuration page on how to edit them.

If you're confident these commands work, you can run:

$ pipenv run pxl deploy

And your site will be uploaded.

You don't have to use the deploy command if you don't want to. You can just take the build output from pxl and use whatever tools you prefer to get it to your webserver.