Liberapay is a recurrent donations platform, forked from Gratipay.
Firstly, make sure you have the following dependencies installed:
- python 2.7
- virtualenv
- postgresql
- make
Then run:
make env
Now you'll need to create two postgres databases, here's the simplest way of doing it:
sudo -u postgres createuser --superuser $USER
createdb liberapay
createdb liberapay_tests
Then you can set up the DB:
make schema
Environment variables are used for configuration, the default values are in
defaults.env
and tests/test.env
. You can override them in
local.env
and tests/local.env
respectively.
Once you've installed everything and set up the database, you can run the app:
make run
It should now be accessible at http://localhost:8339/.
You can create some fake users to make it look more like the real site:
make data
The DB schema is in sql/schema.sql
, but don't modify that file directly,
instead put the changes in sql/branch.sql
. During deployment that script will
be run on the production DB and the changes will be merged into sql/schema.sql
.
That process is semi-automated by release.sh
.
The easiest way to run the test suite is:
make test
That recreates the test DB's schema and runs all the tests. To speed things up you can also use the following commands:
make pytest
only runs the python tests without recreating the test DBmake pytest-re
does the same but only runs the tests that failed in the previous run
If there is something you can't seem to figure out by yourself, come ask us in the IRC channel #liberapay on Freenode.