1
0
Fork 0
A web application to manage political party
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.
Go to file
Alex Kotov fb8b286c5d
Upgrade Rails version from 5.2.1 to 6.0.0.beta1
2019-01-29 14:35:34 +05:00
app Add attribute Person#excluded_since; method Person#excluded_from_party? 2019-01-29 07:15:28 +05:00
bin Revert "Remove binstubs" 2018-11-23 00:53:09 +05:00
config Fix translations 2019-01-29 07:18:14 +05:00
db Add attribute Person#excluded_since; method Person#excluded_from_party? 2019-01-29 07:15:28 +05:00
factories Add attribute Person#excluded_since; method Person#excluded_from_party? 2019-01-29 07:15:28 +05:00
features Add attribute Person#excluded_since; method Person#excluded_from_party? 2019-01-29 07:15:28 +05:00
fixtures Add fixtures 2018-11-30 08:20:12 +05:00
lib Improve code 2018-12-13 09:34:14 +05:00
log Initialize Rails application 2018-11-23 00:33:08 +05:00
public Remove old content 2018-12-05 23:08:07 +05:00
script Install Cucumber 2018-11-30 12:26:46 +05:00
spec Upgrade Rails version from 5.2.1 to 6.0.0.beta1 2019-01-29 14:35:34 +05:00
storage Initialize Rails application 2018-11-23 00:33:08 +05:00
tmp Initialize Rails application 2018-11-23 00:33:08 +05:00
vendor Initialize Rails application 2018-11-23 00:33:08 +05:00
.gitignore Add YARD 2018-12-03 17:51:04 +05:00
.rubocop.yml Upgrade Ruby version from 2.5.1 to 2.6.0 2019-01-29 04:46:07 +05:00
.ruby-gemset Some fixes 2018-11-23 00:35:04 +05:00
.ruby-version Upgrade Ruby version from 2.5.1 to 2.6.0 2019-01-29 04:46:07 +05:00
.simplecov Fix coverage bug 2018-12-09 05:28:25 +05:00
.travis.yml Improve Rake tasks 2018-12-13 07:28:32 +05:00
.yardopts Add YARD 2018-12-03 17:51:04 +05:00
CODE_OF_CONDUCT.md Create CODE_OF_CONDUCT.md 2018-12-04 05:04:56 +05:00
Capfile Fix deploy 2019-01-29 05:47:50 +05:00
Gemfile Upgrade Rails version from 5.2.1 to 6.0.0.beta1 2019-01-29 14:35:34 +05:00
Gemfile.lock Upgrade Rails version from 5.2.1 to 6.0.0.beta1 2019-01-29 14:35:34 +05:00
LICENSE Add license 2018-11-29 17:49:45 +05:00
README.md Fix installation instructions 2019-01-29 06:24:01 +05:00
Rakefile Improve Rake tasks 2018-12-13 07:28:32 +05:00
config.ru Add frozen string literal comments 2018-11-23 00:58:35 +05:00
package-lock.json Install Viewer.js 2018-12-02 18:20:22 +05:00
package.json Install Viewer.js 2018-12-02 18:20:22 +05:00

README.md

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
  • gnupg2
  • liblzma-dev
  • libpq-dev
  • nodejs
  • npm
  • patch
  • zlib1g-dev

Ruby installation

Install Ruby system-wide with RVM:

gpg2 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
\curl -sSL https://get.rvm.io | sudo bash -s stable

Replace user with the name of your current user:

sudo usermod -a -G rvm user

Log out from system, then log in again. Install Ruby and Bundler:

rvm install ruby-2.6.0
rvm use ruby-2.6.0
gem install bundler

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/local/rvm/bin/rvm default do 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/local/rvm/bin/rvm default do 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