Elgg development environment on docker.
- Download or clone the Elgg version you want to work with.
- Run the docker image mounting Elgg as the volume /app. If you're on Windows or OS X and use boot2docker, remember it mounts your C:\Users or /Users directory in the dev VM, so adjust paths accordingly.
- There are a number of environment variables that affect how the the container is built. See below for a list.
- After the container is built, the credentials for Elgg and MySQL are printed if they weren't supplied via enviroment variables.
- Depending on how you're running docker, you may need to expose ports. You can easily
expose all ports by using
docker run -P ...
. - Open the docker vm's IP address and port in your browser. If you're using Kitematic, just click on the preview image and it will open for you. You can also browse to /phpmyadmin for a phpmyadmin installation. Check the docker screen for the mysql root password.
Setting environment vars with -e VAR="value"
in the run command affects the behavior of the installation.
If none are given, defaults are used and output on the screen.
UPDATE_COMPOSER
Should composer packages be updated automatically? (Defaults to 1, set to 0 to disable)MYSQL_USER
The DB username to createMYSQL_PASS
The DB password to set on the created userELGG_DB_HOST
The DB host Elgg will useELGG_DB_USER
The DB user Elgg will useELGG_DB_PASS
The DB password Elgg will useELGG_DB_PREFIX
Elgg's DB prefixELGG_DB_NAME
The name of the DB Elgg will useELGG_SITE_NAME
Elgg's site nameELGG_SITE_EMAIL
Elgg site email addressELGG_WWW_ROOT
Elgg's www_root (Don't change this unless you modify run.sh and the installation)ELGG_DATA_ROOT
The data_root for Elgg (/media)ELGG_DISPLAY_NAME
The display name for the admin userELGG_EMAIL
The email address for the admin user (must be a well-formed, though not necessarily value, address)ELGG_USERNAME
The username of the admin userELGG_PASSWORD
The password for the admin userELGG_PATH
The location Elgg is installed (Don't change this unless you modify run.sh and the installation)ELGG_SITE_ACCESS
The default site accessREINSTALL
Should Elgg force a reinstall? Defaults to 0. Set to 1 to enable. ENABLING WILL DELETE engine/settings.php AND .htaccess!
Replace /path/to/elgg/clone/
with the actual path to you Elgg clone. Note that this will overwrite your settings.php and htaccess files!
docker run -p 8080:80 -e REINSTALL=1 -e ELGG_PASSWORD='asdfjkl' -v /path/to/elgg/clone/:/app jumbojett/elgg-dev-environment