Initial dark mode
Redesign and conversion to Jinja2
Replace existing pipeline with Gulp based on Webpack and Tailwind
Board engine behind Fanboi Channel written in Python.
For production environment, Fanboi2 has the following runtime requirements:
Additionally, the following packages are build-time requirements for compiling assets:
On a non-FreeBSD, you will also need to install BSD Make (usually called bmake
in GNU systems.)
On FreeBSD systems, these packages can be installed with:
$ sudo pkg install ca_root_nss python311 py311-pip py311-sqlite3 postgresql14-server postgresql14-client redis node20 npm-node20
Install PNPM:
$ npm set prefix="$HOME/.local"
$ npm install -g pnpm
Setup PostgreSQL:
$ sudo sysrc postgresql_enable=YES
$ sudo service postgresql initdb
$ sudo service postgresql start
$ sudo -u postgres createuser $USER
$ sudo -u postgres createdb -O $USER fanboi2
$ sudo -u postgres createdb -O $USER fanboi2_dev
$ sudo -u postgres createdb -O $USER fanboi2_test
Setup Redis:
$ sudo sysrc redis_enable=YES
$ sudo service redis start
After all packages are installed, setup the application with:
$ git clone https://git.sr.ht/~sirn/fanboi2
$ cd fanboi2/
$ make
For convenient during development, configure these environment variables in .env
:
$ cat <<EOF > .env
CELERY_BROKER_URL=redis://127.0.0.1:6379/1
DATABASE_URL=postgresql://127.0.0.1:5432/fanboi2_dev
POSTGRESQL_TEST_DATABASE=postgresql://127.0.0.1:5432/fanboi2_test
REDIS_URL=redis://127.0.0.1:6379/0
SERVER_DEV=true
SERVER_HOST=0.0.0.0
SERVER_PORT=6543
SESSION_SECRET=$(openssl rand -hex 32)
AUTH_SECRET=$(openssl rand -hex 32)
EOF
Migrate the database:
$ make db-migrate
Start the application:
$ make prod-run
And you're done. Visit http://localhost:6543/admin/ to perform initial configuration.
Fanboi2 uses environment variable to configure the application. You may want to use something like Direnv to manage these environment variables.
AUTH_SECRET
-- Required. Secret for authentication/authorization cookie.CELERY_BROKER_URL
-- Required. Redis URL for Celery broker, e.g. redis://127.0.0.1/1DATABASE_URL
-- Required. Database URL, e.g. postgres://127.0.0.1/fanboi2REDIS_URL
-- Required. Redis URL, e.g. redis://127.0.0.1/0SESSION_SECRET
-- Required. Secret for session cookie. Must not reuse AUTH_SECRET
.GEOIP_PATH
-- Path to GeoIP database, e.g. /usr/share/geoip/GeoLite2-Country.mmdbSERVER_DEV
-- Boolean flag whether to enable dev console, default FalseSERVER_SECURE
-- Boolean flag whether to only authenticate via HTTPS, default False.To setup Fanboi2 in development mode, run the following commands:
$ make dev
And run the server with:
$ make dev-run
To submit patches to mailing list:
git clone https://git.sr.ht/~sirn/fanboi2
git config sendemail.to ~sirn/fanboi2-dev@lists.sr.ht
git format-patch -1 HEAD
(refer to git-format-patch(1)
for more info)git send-email -1
(refer to git-send-email(1)
for more info)