Skip to content

InforgeNet/xf-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

xf-docker

Docker Compose configuration to easily setup a XenForo 2.x development board with HTTPS enabled. Works under Linux.

Installation

  1. Install Docker and Docker Compose
  2. Dowload XenForo and extract the zip archive inside the web folder; rename the upload folder to xenforo:
cd web/
unzip xenforo.zip
mv upload/ xenforo/
  1. Move to the web/docker-files folder: cd docker-files/
  2. Create root CA key: openssl genrsa -des3 -out rootCA.key 4096
  3. Create root certificate:
openssl req -x509 -new -nodes -key rootCA.key -sha256 -days 1024 \
-out rootCA.crt
  1. Create root private key: openssl genrsa -out localhost.key 2048
  2. Create certificate signing request (Common Name MUST be set to "localhost"):
openssl req -new -key localhost.key -out localhost.csr
  1. Create localhost certificate:
openssl x509 -req -in localhost.csr -CA rootCA.crt -CAkey rootCA.key \
-CAcreateserial -out localhost.crt -days 500 -sha256
  1. Add rootCA.crt as a trusted authority in your browser/system
  2. Obtain your user id and group id using the commands id -u and id -g
  3. Go back to the repository root directory and edit the LOCAL_USER_ID and LOCAL_GROUP_ID build arguments with your user and group ids:
services:
  web:
    build:
      context: ./web
      args:
        - LOCAL_USER_ID=<your_user_id>
        - LOCAL_GROUP_ID=<your_group_id>
    container_name: xfdev
[.....]
  1. Build services: docker-compose build from the repository root directory
  2. Run services: docker-compose up -d
  3. Install XenForo: ./cmd.sh xf:install

Try to visit https://localhost

Configuration for XenForo is available in web/config.php.

From now on, you just need docker-compose down to stop the containers and docker-compose up -d to start them.

Add your addons

Addons can be found inside the web/xenforo/src/addons directory. You can symlink the directory in a more convenient location.

Install the addon: ./cmd.sh xf:addon-install Your/AddOnId

Vim Vdebug

If using vim wih vdebug, configure the plugin as follow:

let g:vdebug_options={}
let g:vdebug_options.ide_key = 'XDEBUG_VIM'
let g:vdebug_options.path_maps = {
	\ "/var/www/html": resolve(expand("~/path/to/xenforo/root"))
\ }
let g:vdebug_options["port"] = 9003

The path to the xenforo root directory (web/xenforo/) can also be a symlink.

Releases

No releases published

Packages

No packages published