ffmboard

command module
v0.0.0-...-1a9902f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 20, 2020 License: AGPL-3.0, AGPL-3.0-or-later Imports: 1 Imported by: 0

README

ffmboard

Real-time music-oriented imageboard for filtered.fm. Forked from meguca.

If you'd like to contact site staff/developers in private, please email filteredstaff@protonmail.com or add ibis#9492 on Discord.

meguca upstream is currently undergoing a v7 rewrite on its master branch. v6 is the stable branch, and the default branch ffmboard uses. Whenever v7 is stable and ready for use, we'll likely try to switch to it, but until then all work will go on v6, and we'll try to stay in sync with upstream v6 as much as we can.

Runtime dependencies

Docker

ffmboard can be deployed in a self-contained Docker container.

First, run

git clone git://github.com/filteredfm/ffmboard.git

Second, navigate to the folder that was just created with

cd ffmboard

Then, install Docker and Docker Compose and run

docker-compose build
docker-compose up -d

For more information refer to the Docker Compose docs.

Update

If you ever want to update ffmboard to the newest version, stop the container with

docker-compose down

Then, pull the changes with

git pull origin

Finally, rebuild and start the container with

docker-compose build
docker-compose up -d

Building from source

Native installation.

For installing ffmboard directly onto a server follow the steps bellow. A reference list of commands can be found in ./docs/installation.md

Build dependencies
  • Go >=1.13 (for building server)
  • Node.js >=5.0 (for building client)
  • C11 compiler
  • make
  • pkg-config
  • pthread
  • ffmpeg 3.2+ libraries (libavcodec, libavutil, libavformat, libswscale) compiled with:
    • libvpx
    • libvorbis
    • libopus
    • libtheora
    • libx264
    • libmp3lame
  • OpenCV >= 2
  • libgeoip
  • git

NB: Ubuntu patches to ffmpeg on some Ubuntu versions <19.10 break image processing. In that case please compile from unmodified ffmpeg sources using:

sudo apt build-dep ffmpeg
git clone https://git.ffmpeg.org/ffmpeg.git ffmpeg
cd ffmpeg
git checkout n4.1
./configure
make -j`nproc`
sudo make install
Linux and OSX
  • Run make

Setup

Deployment

ffmboard can be started in debug mode simply with ./ffmboard. Configurations are split between ffmboard instance configurations and server instance configurations, which are required to start the server and connect to the database. The ffmboard instance configurations are stored in the database, but server instance configurations are optionally loaded from a config.json file on server start. A sample configuration file can be found under docs/config.json. Documentation for this file is available under docs/config.jsonc.

It is recommended to serve ffmboard behind a reverse proxy like NGINX or Apache with properly configured TLS settings. A sample NGINX configuration file can be found in docs/.

Initial instance configuration
  • Login into the "admin" account via the infinity symbol in the top banner with the password "password"
  • Change the default password
  • Create a board from the administration panel
  • Configure server from the administration panel

Development

  • See ./docs for more documentation
  • make server and make client build the server and client separately
  • make watch watches the file system for changes and incrementally rebuilds the client
  • make clean removes files from the previous compilation
  • make {test,test_no_race,test_docker} run regular, without data race detection and Dockerized test suites, respectively
  • To run server unit tests (unless Dockerized) add database creation rights to your PostgreSQL role

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Package auth determines and asserts client permissions to access and modify server resources.
Package auth determines and asserts client permissions to access and modify server resources.
Package cache provides an in-memory LRU cache for reducing the duplicate workload of database requests and post HTML and JSON generation
Package cache provides an in-memory LRU cache for reducing the duplicate workload of database requests and post HTML and JSON generation
Package common contains common shared types, variables and constants used throughout the project
Package common contains common shared types, variables and constants used throughout the project
Package config stores and exports the configuration for server-side use and the public availability JSON struct, which includes a small subset of the server configuration.
Package config stores and exports the configuration for server-side use and the public availability JSON struct, which includes a small subset of the server configuration.
Package db handles all core database interactions of the server
Package db handles all core database interactions of the server
Package imager handles image, video, etc.
Package imager handles image, video, etc.
assets
Package assets manages imager file asset allocation and deallocation
Package assets manages imager file asset allocation and deallocation
Package mlog handles the log and it's handlers
Package mlog handles the log and it's handlers
Package parser parses and verifies user-sent post data
Package parser parses and verifies user-sent post data
Package server handles client requests for HTML page rendering, JSON and websocket connections
Package server handles client requests for HTML page rendering, JSON and websocket connections
Package templates generates and stores HTML templates
Package templates generates and stores HTML templates
Package test contains utility functions used throughout the project in tests
Package test contains utility functions used throughout the project in tests
Package util contains various general utility functions used throughout the project.
Package util contains various general utility functions used throughout the project.
Package websockets manages active websocket connections and messages received from and sent to them
Package websockets manages active websocket connections and messages received from and sent to them
feeds
Package feeds manages client synchronization to update feeds and provides a thread-safe interface for propagating messages to them and reassigning feeds to and from clients.
Package feeds manages client synchronization to update feeds and provides a thread-safe interface for propagating messages to them and reassigning feeds to and from clients.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL