Skip to content

Latest commit

History

15 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

MyBB Development Stack (Docker Compose)

Development stack (PHP interpreter, web server, database server) for the MyBB forum software. Not for production use.

Quick Start

  1. Install Docker Desktop (or Docker Engine + Docker Compose).

  2. Clone/download this repository on your computer, placing it next to the MyBB source code directory (which can be a cloned mybb/mybb repository):

    .
    ├── mybb/
    └── deploy/
    
  3. In the deploy/ directory, run:

    docker compose up

    Once the services are running, MyBB should be available at http://localhost:8080.

Database Systems

The following database engines are available for MyBB installation:

  • PostgreSQL (enabled by default):
    • Database Host: postgresql
    • Database Name: mybb
    • Database User: mybb
    • Database Password: mybb
  • MySQL:
    • Database Host: mysql
    • Database Name: mybb
    • Database User: mybb
    • Database Password: mybb
  • SQLite (if supported by the PHP configuration)

By default, only the PostgreSQL service is started. To start the MySQL service, include the db.mysql profile in the .env file:

COMPOSE_PROFILES=db.mysql

and restart.

Switching PHP Versions

To switch the PHP version, change it in the .env file (see available X.Y versions):

PHP_VERSION=7.4

and restart the container with docker compose up -d.

Using Custom Images

To use PHP versions not available in the pre-built images, but included in an official PHP base image, change the PHP_IMAGE variable to custom in the .env file:

PHP_IMAGE=customPHP_VERSION=8.1.0RC2

and build the image using

docker compose build

and restart.

Environment Variables

The following variables can be set in the .env file:

NameDefaultDescription
SOURCE_PATH../mybbPath to served files
PHP_IMAGEprebuiltBase image for the PHP service (prebuilt or custom)
PHP_VERSION8.2PHP version to use. Depends on available base images
COMPOSER_NO_DEV1Equivalent to --no-dev for composer install when set to 1
XDEBUG1Whether to install Xdebug when building a custom PHP image
XDEBUG_VERSIONempty stringWhich version of the Xdebug Pecl package to install when building a custom PHP image (see compatibility)
NGINX_PUBLISHED_PORT8080The port accessible from the host machine
POSTGRESQL_PUBLISHED_PORT6432The port accessible from the host machine
MYSQL_PUBLISHED_PORT4306The port accessible from the host machine
COMPOSE_PROFILESdb.postgresql,composer,install- database service (postgresql or mysql)
- auto-install Composer dependencies
-auto-install MyBB (≥ 1.9)
MYBB_DEV_MODE1Enable MyBB's development mode when set to 1

About

Development stack (PHP interpreter, web server, database server) for MyBB.

Resources

Stars

0 stars

Watchers

8 watching

Forks

Contributors

Languages