Skip to content

5quinque/2kanna

Repository files navigation

2Kanna

GitHub GitHub Workflow Status Codecov

Requirements


Features

  • Image & Video WebM file upload (Local storage or S3 compatible)
  • Tree post structure
  • Code formatting
  • Crosslinking posts and posts from other boards
  • Autoupdating threads
  • Allow anonymous board creation
  • Sticky posts

Installation


File Uploads

Files can either be stored on the local filesystem or on a S3 compatible object storage bucket

Local File Storage

In config/packages/vich_uploader.yaml change 'upload_destination' to 'local_filesystem'
In config/packages/liip_imagine.yaml change the filter caches to 'default'

S3 File Stoage

In config/packages/vich_uploader.yaml ensure 'upload_destination' is set to 's3_filesystem'
In config/packages/liip_imagine.yaml ensure the filter caches are set to 's3_cache'

Apply image filters using a worker process

To ensure thumbnails and other filters are applied to images and a clean URL is served from the first request, you will need to set the environment variable WAIT_IMAGE_FILTER to true. You will then need to have the following worker process running at all times

php bin/console enqueue:consume --setup-broker

If you're using Heroku, this should be running as defined in the Procfile

AMQP or Filesystem?

The default in .env is ENQUEUE_DSN=file://%kernel.project_dir%/var/queue which use files on local filesystem as queues. There's a few drawbacks to this, the main is it's CPU intensive.

An alternative is using AMQP, which requires additional setup but offloads the queue. Simply update the ENQUEUE_DSN variable.

E.g.

ENQUEUE_DSN=amqp://user:pass@host/queue

You could possible use other methods (check the php-enqueue docs), but I've not tested them.


Development

See docs/development