Skip to content

Repository files navigation

Mendako

Quick project done over the course of a week.

Private, light booru-like image board, supports multiple boards.

Inspired by https://github.com/danbooru/danbooru

Screenshots

Installation

Step 1 -> Create a docker-compose.yml file

version: '3.4'

services:
    mendako:
        container_name: mendako
        image: benjaminjonard/mendako
        restart: unless-stopped
        ports:
            - 81:80
        env_file:
            - .env
        depends_on:
            - mendako_postgresql
        volumes:
            - "./volumes/mendako/public/uploads:/uploads"
            - "./volumes/mendako/public/thumbnails:/thumbnails" #Not mandatory

    mendako_postgresql:
        container_name: mendako_postgresql
        image: postgres:15
        restart: unless-stopped
        env_file:
            - .env
        environment:
            - POSTGRES_DB=${DB_NAME}
            - POSTGRES_USER=${DB_USER}
            - POSTGRES_PASSWORD=${DB_PASSWORD}
        volumes:
            - "./volumes/postgresql:/var/lib/postgresql/data"

    # Only required for ML tasks, you can remove it if you don't want autotagging
    mendako_ml:
        container_name: mendako_ml
        build: ./ml
        restart: unless-stopped
        volumes:
            - "./ml/app:/app/app"        

Step 2 -> Create a .env file

########################################################################################################
#                                                WEB
#
# APP_DEBUG=1 displays detailed error message
#
# APP_SECRET is a random string used for security, you can use for example openssl rand -base64 21
# APP_SECRET is automatically generated when using Docker
#
# PHP_TZ, see possible values here https://www.w3schools.com/php/php_ref_timezones.asp
# APP_THUMBNAILS_FORMAT possible values : jpeg, png, webp, avif. Leave empty if you want to keep the original image format
# APP_POST_PER_PAGE and APP_INFINITE_SCROLL_POST_PER_PAGE are limited to 200
########################################################################################################

APP_DEBUG=0
APP_ENV=prod
#APP_SECRET=

HTTPS_ENABLED=1
UPLOAD_MAX_FILESIZE=20M
PHP_MEMORY_LIMIT=512M
PHP_TZ=Europe/Paris

APP_THUMBNAILS_FORMAT=
APP_POST_PER_PAGE=20
APP_INFINITE_SCROLL_POST_PER_PAGE=50

########################################################################################################
#                                                DATABASE
########################################################################################################

DB_NAME=mendako
DB_HOST=mendako_postgresql
DB_PORT=5432
DB_USER=mendako
DB_PASSWORD=mendako
DB_VERSION=15

########################################################################################################
#                                                MACHINE LEARNING (AUTOTAG)
########################################################################################################
APP_AUTOTAG_ENABLED=0
APP_ML_URL=http://mendako_ml:8000
APP_AUTOTAG_AUTOVALIDATE_THRESHOLD_WD=30
APP_AUTOTAG_BOARDS_WITH_WD=board1,board2

Step 3 -> Review both files and update values if required

Step 4 -> Start Mendako

docker-compose up -d

Optional: Automatic tags

Mendako can suggest tags on upload using a local automatic tagging inference service. It is fully optional.

To enable it, add the mendako_ml to your docker-compose.yml:

    mendako_ml:
        container_name: mendako_ml
        image: benjaminjonard/mendako-ml
        restart: unless-stopped

Tagging uses WD EVA02 Large v3, which produces Danbooru tags and a content rating — it targets illustrations rather than photographs. List a board's slug in APP_AUTOTAG_BOARDS_WITH_WD to have it tagged; a board left out is never tagged. Staged bulk uploads are not tagged either: they have no board yet, so tagging happens once they are assigned to one.

The model is baked into the mendako-ml image at build time — there is no runtime download.

Available environment variables

Name Description Possible values
DB_USER Your database user
DB_PASSWORD Your database password
DB_HOST Your database address
DB_PORT Your database port
DB_NAME Your database name
DB_VERSION Your database server version ex: 10.3
APP_SECRET Random string used for security
APP_ENV Symfony environment, prod by default prod or dev
APP_DEBUG Activate Symfony debug mode, 0 by default 0 or 1
HTTPS_ENABLED If your instance uses https 0 or 1
UPLOAD_MAX_FILESIZE Defaults to 20M
PHP_MEMORY_LIMIT Defaults to 512M
PHP_TIMEZONE You timezone, default to Europe\Paris https://www.w3schools.com/php/php_ref_timezones.asp
APP_AUTOTAG_ENABLED Hard master switch for Automatic tags 0 (default, off) or 1
APP_ML_URL URL of the optional automatic tagging inference service default http://mendako_ml:8000
APP_AUTOTAG_AUTOVALIDATE_THRESHOLD_WD Min WD confidence (percent) to auto-validate a suggested tag 0100, default 85
APP_AUTOTAG_BOARDS_WITH_WD Boards tagged by the WD tagger comma-separated slugs, * for all, empty for none

Support Mendako

There are a few things you can do to support Mendako :

  • If you like Mendako please consider leaving a ⭐, it gives additional motivation to continue working on the project
  • Report any bug or error you see
  • English is not my first language, it would be a huge help if you could report any mistakes in Mendako.

You can contribute and edit translations here: https://crowdin.com/project/mendako. If you wish to contribute to a new language, please open a discussion on github or crowdin and I'll gladly add it. You are also welcome if you want to proofread existing translations.

Translations status

Available

English
100%
Japanese
100%
Portuguese, Brazilian
100%
Spanish
100%
French
98%
Hungarian
97%

Licensing

Mendako is an Open Source software, released under the MIT License.

About

Private, light booru like image board, supports multiple boards.

Topics

Resources

Code of conduct

Contributing

Stars

38 stars

Watchers

3 watching

Forks

Releases

Used by

Contributors

Languages