Last active
August 23, 2017 04:37
-
-
Save daohoangson/5c2593532bf55f707b143722385a76db to your computer and use it in GitHub Desktop.
Advanced usage of https://github.com/xfrocks/DevHelper docker dev env
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$config['db']['host'] = 'mysql'; | |
$config['db']['port'] = '3306'; | |
$config['db']['username'] = 'root'; | |
$config['db']['password'] = 'root'; | |
$config['db']['dbname'] = 'xenforo'; | |
if (preg_match('/^xenforo-(?<dbname>[a-z]+)\./', $_SERVER['SERVER_NAME'], $serverNameMatches)) { | |
$config['db']['dbname'] = $serverNameMatches['dbname']; | |
} | |
$config['debug'] = true; | |
$config['superAdmins'] = '1'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://github.com/xfrocks/DevHelper/wiki/Setup-Dev-Env | |
# After docker-compose up, go to http://xenforo.local.xfrocks.com:8150/install to set it up | |
# For multiple instances, go to http://xenforo-<id>.local.xfrocks.com:8150/install after creating <id> database in MySQL | |
version: '2' | |
services: | |
php: | |
build: | |
context: addons/DevHelper/dev-scripts | |
dockerfile: Dockerfile.php-apache | |
ports: | |
- "8150:80" | |
links: | |
- mysql | |
volumes: | |
- ./xenforo1.5.14:/var/www/html/xenforo | |
- ./addons:/var/www/html/addons | |
- ./addons/DevHelper:/var/www/html/ | |
- ./.data:/var/www/html/xenforo/data | |
- ./.data/internal:/var/www/html/xenforo/internal_data | |
mysql: | |
image: mysql | |
environment: | |
MYSQL_ROOT_PASSWORD: 'root' | |
MYSQL_DATABASE: 'xenforo' | |
ports: | |
- "8151:3306" | |
volumes: | |
- ./.data/mysql:/var/lib/mysql |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment