fosspay/README.md

71 lines
2.0 KiB
Markdown
Raw Normal View History

2015-09-07 01:06:19 +00:00
# fosspay [![Donate with fosspay](https://drewdevault.com/donate/static/donate-with-fosspay.png)](https://drewdevault.com/donate?project=3)
2015-09-05 02:51:20 +00:00
2015-09-07 01:06:19 +00:00
Donation collection for FOSS groups and individuals.
2015-09-05 02:51:20 +00:00
2015-09-07 01:06:19 +00:00
* Supports one-time and monthly donations
* Process cards with Stripe
2015-09-07 01:06:19 +00:00
* Flexible and customizable
2015-09-05 02:51:20 +00:00
2015-09-07 01:06:19 +00:00
It works for individuals (like me) and it works for organizations. Expect to
spend about an hour or two setting up everything and then you're good to go.
2015-09-05 02:51:20 +00:00
2017-12-07 18:04:24 +00:00
For support, visit [#cmpwn on
irc.freenode.net](http://webchat.freenode.net/?channels=cmpwn&uio=d4)
or file a GitHub issue.
2015-09-05 02:51:20 +00:00
2017-12-07 18:04:24 +00:00
## Before you start
2015-09-05 02:51:20 +00:00
2015-09-07 01:06:19 +00:00
You will need a number of things set up before you start:
2015-09-05 02:51:20 +00:00
2015-09-07 01:06:19 +00:00
1. An approved [Stripe](https://stripe.com/) account
2017-12-07 18:04:24 +00:00
1. A mail server
1. A domain name and an SSL certificate
1. A web server to host fosspay on
2015-09-05 02:51:20 +00:00
2015-09-07 01:06:19 +00:00
## Installation
2015-09-05 02:51:20 +00:00
2015-09-07 01:06:19 +00:00
Install these things:
2015-09-05 02:51:20 +00:00
2015-09-07 01:06:19 +00:00
* Python 3
* pip (python 3)
* PostgreSQL
2015-09-05 02:51:20 +00:00
2015-09-07 01:06:19 +00:00
You're responsible for setting up PostgreSQL yourself. Prepare a connection
string for later.
2015-09-05 02:51:20 +00:00
2015-09-07 01:06:19 +00:00
Clone the git repository on the server that you want to host fosspay on:
2015-09-05 02:51:20 +00:00
2020-12-06 14:37:33 +00:00
git clone https://git.sr.ht/~sircmpwn/fosspay
2015-09-07 01:06:19 +00:00
cd fosspay
2015-09-05 02:51:20 +00:00
2015-09-07 01:06:19 +00:00
Install the Python packages:
2015-09-05 02:51:20 +00:00
2015-09-07 01:06:19 +00:00
sudo pip3 install -r requirements.txt
2015-09-05 02:51:20 +00:00
2015-09-07 01:06:19 +00:00
Compile the static assets:
2015-09-05 02:51:20 +00:00
2015-09-07 01:06:19 +00:00
make
2015-09-05 02:51:20 +00:00
2015-09-07 01:06:19 +00:00
Create a configuration file:
cp config.ini.example config.ini
2015-09-05 02:51:20 +00:00
2015-09-07 01:06:19 +00:00
Edit `config.ini` to your liking. Then, you can run the following to start up
the development server:
python3 app.py
2015-09-05 02:51:20 +00:00
2015-09-07 01:06:19 +00:00
Log into http://your-domain:5000, and you will receive further instructions.
2015-09-07 01:06:19 +00:00
## Deployment
2015-09-07 01:06:19 +00:00
Once you have everything configured, you will need to switch from the dev server
into something more permanent. Install gunicorn on your server and use the
systemd unit provided in `contrib/`. You will also probably want to run this
through nginx instead of directly exposing gunicorn to the web, see
`contrib/nginx.conf`. Neither the nginx configuration or the systemd unit are
immediately ready to use - read them and change them to suit your needs.
2015-09-05 02:51:20 +00:00
2015-09-07 01:06:19 +00:00
Using nginx or something like it is necessary for SSL support, and you must
serve your site with https for Stripe to work.