Repository moved to https://clif.peers.community/zplus/freepost.git https://freepo.st

zPlus 4f5f90047f Fix #97 Issue within server test regarding bottle. %!s(int64=3) %!d(string=hai) anos
freepost 4f5f90047f Fix #97 Issue within server test regarding bottle. %!s(int64=3) %!d(string=hai) anos
.gitignore 0382939232 Fix file permissions. %!s(int64=4) %!d(string=hai) anos
.htaccess.cgi be631324d7 Initial port. %!s(int64=6) %!d(string=hai) anos
.htaccess.wsgi be631324d7 Initial port. %!s(int64=6) %!d(string=hai) anos
LICENSE 0382939232 Fix file permissions. %!s(int64=4) %!d(string=hai) anos
README.md aff2f06eb8 New logo. %!s(int64=3) %!d(string=hai) anos
database.schema.sql f3e0c86077 Move from mysql to sqlite. %!s(int64=5) %!d(string=hai) anos
favicon.ico 47a5fe815b Update logo and favicon files. %!s(int64=3) %!d(string=hai) anos
favicon.svg 47a5fe815b Update logo and favicon files. %!s(int64=3) %!d(string=hai) anos
freepost.cgi 575e16c64e Revert permissions back to 755 for cgi and wsgi scripts. %!s(int64=4) %!d(string=hai) anos
passenger_wsgi.py 575e16c64e Revert permissions back to 755 for cgi and wsgi scripts. %!s(int64=4) %!d(string=hai) anos
requirements.txt 4f5f90047f Fix #97 Issue within server test regarding bottle. %!s(int64=3) %!d(string=hai) anos
robots.txt 0382939232 Fix file permissions. %!s(int64=4) %!d(string=hai) anos
settings.yaml 7ee2c696ae Fix #92 "reset password form not working" %!s(int64=5) %!d(string=hai) anos

README.md

freepost

This is the code powering freepost, a free discussion board that allows users to post text and links that other users can read and comment.

Development

Setup Python3 virtual environment

cd freepost-directory
python3 -m venv venv (if this doesn't work, try `virtualenv -p /usr/bin/python3 venv`)
source venv/bin/activate
pip3 install -r requirements.txt

Run test server

source venv/bin/activate
python3 -m bottle --debug --reload --bind 127.0.0.1:8000 freepost

Build stylesheets

Build CSS files

stylus --watch --compress --disable-cache --out freepost/static/css/ freepost/static/stylus/freepost.styl

Deployment

  • Build CSS stylesheets (see Development above)
  • Copy all files to your public_html folder
  • Make sure settings.yaml has restricted permissions, for instance 0600
  • If the SQLite database is located in the same HTML folder, make sure this too has restricted access
  • Rename .htaccess.wsgi or .htaccess.cgi to .htaccess (if you use CGI or WSGI)
  • Change settings in settings.yaml if needed
  • Create Python virtual environment For tuxfamily only: run newgrp freepost before creating the virtenv, for quota reasons
  • Create a new empty SQLite database: cat database.schema.sql | sqlite3 database.sqlite

Everything should be setup and working. Make sure your CGI or WSGI server is configured correctly.

License

freepost is free software licensed as GNU Affero General Public License, either version 3 or (at your option) any later version.

monkey logo art by iko, released as CC0.