1
0
Fork 0
This repository has been archived on 2023-03-28. You can view files and clone it, but cannot push or open issues or pull requests.
lpr-partynest/README.md

2.2 KiB

Partynest

Build Status Coverage Status Maintainability Inline docs

A web application to manage political party members and supporters.

Table of contents

Deploy

Tested with Ubuntu Server 18.04 LTS.

System packages

  • build-essential
  • bundler
  • liblzma-dev
  • libpq-dev
  • nodejs
  • npm
  • patch
  • ruby
  • ruby-dev
  • rubygems-integration
  • zlib1g-dev

Steps

  • Create directory /opt/partynest/ writable by deploy user
  • Copy file config/master.key to /opt/partynest/shared/config/
  • Create PostgreSQL role partynest with password password
  • Create PostgreSQL database partynest_production owned by partynest

Example systemd services

Replace user with the name of user and group with the name of group which you want an application to run as.

Web server

[Unit]
After=syslog.target network.target
Description=Partynest web server

[Service]
ExecStart=/usr/bin/bundle exec puma --environment production
Group=group
Restart=always
RestartSec=1
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=partynest-web
Type=simple
User=user
WorkingDirectory=/opt/partynest/current

[Install]
WantedBy=multi-user.target

Job processing

[Unit]
After=syslog.target network.target
Description=Partynest job processing

[Service]
ExecStart=/usr/bin/bundle exec sidekiq --environment production
Group=group
Restart=always
RestartSec=1
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=partynest-worker
Type=simple
User=user
WorkingDirectory=/opt/partynest/current

[Install]
WantedBy=multi-user.target