Thanks for subscribing! We'll let you know how Passit is progressing.

How to install Passit

To run Passit yourself, you need:

Using Passit without SSL would defeat the security model and is unsupported. Consider using Let’s Encrypt for free SSL.

With Docker

Docker is the preferred way to run Passit’s web server. For the database, we recommend running the database without Docker or from a SaaS provider at this time.

  1. Ensure docker and docker-compose are installed on base system.
  2. Install PostgreSQL locally or use a service like Amazon RDS.
  3. Copy docker-compose.production.yml anywhere you’d like in the base system.
  4. Edit the docker-compose.production.yml and optionally edit the environmental variables listed in it, documented below under “Configurations”.
  5. Run docker-compose up -d to start our front and back end applications.
  6. Install nginx or your favorite web server or load balancer.
  7. Configure virtual hosts in nginx.
  8. Run the django migrations (do this on every upgrade). In the container run ./manage.py migrate. So if using docker compose you could run docker-compose run --rm api ./manage.py migrate.

One way to configure nginx is to point mydomain.com to port 8000 (or as defined in docker-compose file) and then use certbot to set up SSL for you.

Example nginx configuration in /etc/nginx/sites-enabled/default BEFORE running certbot.

server { 
        server_name mydomain.com; 
 
        location / { 
          proxy_pass http://127.0.0.1:8000; 
          proxy_set_header Host $host; 
        } 
} 

Now install certbot and run certbot --nginx. Follow instructions and now you should have SSL set up all for you. Note that certbot will add some additional configuration to nginx’s conf.

Finally just go to mydomain.com and you should see the frontend.

Upgrading

  1. docker-compose pull in the same folder with docker-compose.production.yml
  2. docker-compose restart

With OpenShift

OpenShift v3 is fully supported and a great way to run Passit. These instructions mostly work for Kubernetes as well.

  1. Install a postgres container with persistent storage OR use a service like RDS.
  2. Start a new app using Passit’s Docker image and make sure to set the environmental variables given below under “Configuration.”
    oc new-app --dry -e SECRET_KEY=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 10 | head -n 1) -e DATABASE_URL=... -e ... registry.gitlab.com/passit/passit-frontend:master
    

    Note that the SECRET_KEY environment variable is set to a random string.

  3. Configure SSL. With OpenShift online you could use the provided openshiftapps.com domain or set your own. To use openshiftapps.com simply autogenerate the hostname (leave it blank), pick passit-frontend as your service, check of “secure route” and leave everything else as default. To use your own domain, we suggest at this time purchasing a cert as openshift is difficult to use with let’s encrypt.

Consider adding a pre hook to run bin/pre.sh for example in the deployment yaml under strategy, rollingParams:

pre:
  failurePolicy: Abort
  execNewPod:
    command:
      - bin/pre.sh
    env:
      - name: PYTHONUNBUFFERED
        value: '1'
  containerName: passit-frontend

This hook will run django migrations for you on every deploy. To run them manually rsh into a pod and run ./manage.py migrate.

With Heroku

Support coming soon.

Without Docker

This method is less supported. Only do this if you do not wish to use Docker and know how to run a basic Django app with static HTML front end.

Checkout the master branch of passit-backend Run Django as you would any Django app with something like uWSGI + nginx.

Download the static passit-frontend build (click the download arrow and then Download build_yarn artifacts). Place the files where you serve static html/css/js files from.

passit.yourdomain.com < Static html api.passit.yourdomain.com < Django server

Set up the environmental variables below. Set up SSL on both domains.

Configuration

Configuration is done by setting these environment variables

Extensions

There currently isn’t a huge difference between Passit on the Web and Passit in your browser, but that will change over time.

If you like living on the bleeding edge, head on over to the passit-frontend repo and check the readme to learn how to build the extension from source.