Code Blog Contributing Log In / Sign Up Passit Installation Guide To learn more about updating Passit, visit our update guide. To run Passit yourself, you need: A PostgreSQL database. A Docker container that runs the combined Django backend API and Web frontend An SMTP server - for personal use Gmail is fine. Using Passit without SSL would defeat the security model and is unsupported. Consider using Let’s Encrypt for free SSL. You can also use OpenShift Online or Heroku, which are easier methods to run Passit. With Docker For the database, we recommend running the database without Docker or from a SaaS provider at this time. Ensure docker and docker-compose are installed on base system. Install PostgreSQL locally or use a service like Amazon RDS. Copy docker-compose.production.yml anywhere you’d like in the base system. Edit the docker-compose.production.yml and optionally edit the environmental variables listed in it, documented below under “Configurations”. Run docker-compose up -d to start our front and back end applications. Install nginx or your favorite web server or load balancer. Configure virtual hosts in nginx. 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. With OpenShift OpenShift v3 is fully supported and a great way to run Passit. These instructions are a good starting point for Kubernetes as well. A nice advantage of using OpenShift is that database migrations can run automatically. Create a database either in OpenShift itself or a service like RDS. Enable the hstore postgresl extension. From a OpenShift postgresql pod bash terminal it would look like: sql sampledb -c "create extension hstore; Import this YAML template under “Add to project”. Review each parameter and make sure to enter your database connection information. 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). To use your own domain, we suggest at this time purchasing a cert as openshift is difficult to use with let’s encrypt. To install the cert just edit the route made in step 3. With Heroku Heroku is supported via the Docker container runtime. At this time database migrations must be run manually. We show Heroku CLI shortcuts, but steps 1, 2, and 4 can be done on Heroku Dashboard if you’re more comfortable there. Create a new Heroku app. heroku apps:create <heroku-app-name> Add a Postgres database to your new app. heroku addons:create heroku-postgresql --app <heroku-app-name> Deploy the Docker image. docker pull registry.gitlab.com/passit/passit-frontend:master docker tag registry.gitlab.com/passit/passit-frontend:master registry.heroku.com/<heroku-app-name>/web heroku container:login docker push registry.heroku.com/<heroku-app-name>/web Set environment variables. DATABASE_URL should already be set IS_DEBUG should be False SECRET_KEY should be a random string of 40 characters. heroku config:set ENV_VAR=Value --app <heroku-app-name> heroku config --app <heroku-app-name> to confirm that everything is set View the Configuration section below for more information and variables. Manually migrate the database: heroku run --app <heroku-app-name> ./manage.py migrate The app should be up and running, but you’ll need to configure email in order to complete account registrations. Without Docker This method is not 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 Required settings DATABASE_URL: PostgreSQL URL as parsed by dj-database-url EMAIL_URL: The SMTP url to use for sending email - see email_url from here for syntax. For Gmail it would be like smtp+tls://user@:password@smtp.gmail.com:465 DEFAULT_FROM_EMAIL: Email to use as sender EMAIL_CONFIRMATION_HOST: Host that should used in confirmation email to link back to where to confirm. SECRET_KEY: Make this unique but it can be anything. 40+ characters is good. This is the Django server SECRET_KEY. Do not share this. Optional settings IS_PRIVATE_ORG_MODE: (default: False) Set True for a private Passit instance in which all contacts are shared (no need to look up by exact email). PRIVATE_ORG_MODE_WHITELIST: (default: None) Comma seperated domain whitelist for self registration. Example mycompany.com,otherplace.org. Extensions Install Passit for Firefox Install Passit for Chrome © 2018 Burke Software and Consulting • Privacy Policy • Security Policy