A member engagement platform for the pirate movement, and anyone else.
- White label refactor.
- Community organising features.
- Election and funding features.
-
Install vagrant
-
Install ansible
-
Clone the project
git clone https://github.com/ppau/piratedb
-
Start the vagrant vm, system will
vagrant provision
on first 'up'.vagrant up
-
Log onto the vm
vagrant ssh
-
Find the project files
cd /vagrant
-
Install dependencies
npm install
-
Create your environment configuration files
Using the the *.json.example files in the repository root
config
folder, setup your environment.You will probably need to define sections for each of the following:
- development
- test
- staging
- production
-
Run migrations
Check the status of migrations from the repository root with:
sequelize db:migrate:status --config=src/backend/config/sequelize.js
Run migrations forward from the repository root with:
sequelize db:migrate --config=src/backend/config/sequelize.js
Create new migrations:
sequelize migration:create --name your_migration_name --config=src/backend/config/sequelize.js
-
Create an administrator user
npm run manage
-
Start the dev server
npm run dev
This will start three processes:
- auto-reloading jsx frontend compiler
- auto-reloading node backend server
- stylesheet sass compiler with watch
These processes can be run individually, refer to the
package.json
scripts section.
WARNING: Do not use these deployment scripts against existing servers or systems, or any system not safely backed up.
WARNING: These provisioning scripts install and configure the entire system environment they target: system packages, firewalls, databases, user accounts etc.
WARNING: You get the message right? Use at your own risk.
Ansible 2.3+ is probably required, the scripts
directory provides two scripts which may help you:
prod-deploy.sh
for new servers, and;prod-upgrade.sh
for upgrading to new PirateDB application versions.
These scripts required some exported vars and should target Ubuntu 16.04 images dedicated to the PirateDB application and no other services or applications.
-
Run server side tests TODO
npm run serverTests
-
Run client side tests TODO
npm run componentTests
-
Create an admin user to access the treasurer/secretary views
npm run manage