Skip to content

mybb/deploy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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=custom
PHP_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:

Name Default Description
SOURCE_PATH ../mybb Path to served files
PHP_IMAGE prebuilt Base image for the PHP service (prebuilt or custom)
PHP_VERSION 8.2 PHP version to use. Depends on available base images
COMPOSER_NO_DEV 1 Equivalent to --no-dev for composer install when set to 1
XDEBUG 1 Whether to install Xdebug when building a custom PHP image
XDEBUG_VERSION empty string Which version of the Xdebug Pecl package to install when building a custom PHP image (see compatibility)
NGINX_PUBLISHED_PORT 8080 The port accessible from the host machine
POSTGRESQL_PUBLISHED_PORT 6432 The port accessible from the host machine
MYSQL_PUBLISHED_PORT 4306 The port accessible from the host machine
COMPOSE_PROFILES db.postgresql,composer,install - database service (postgresql or mysql)
- auto-install Composer dependencies
-auto-install MyBB (≥ 1.9)
MYBB_DEV_MODE 1 Enable MyBB's development mode when set to 1

About

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

Resources

Stars

Watchers

Forks