Local Development

Setting up


You will need to have Docker installed to run the development environment. Although not strictly necessary, it is also a good idea to install NVM to manage different Node versions.

To develop Dijon Platform sites locally, you will need Dijon Platform support to give you the following:

  1. The Git URL for your site
  2. The Git URL to pull down the Dijon Platform Development Environment
  3. A config.php file.

Download the code

Once you have the prerequisites you can progress with setting up your environment.

Clone the development environment repository

Replace the Git URL with the Dijon Platform development environment Git URL.

git clone git@gitserver.com:dijon/dijon/devenv/dijon.git

Move into the Dijon Platform developer environment directory

cd dijon

Ensure there is a sites directory

mkdir -p sites

Move into the sites directory

cd sites

Clone the Git URL for your site

git clone git@gitserver.com:dijon/dijon/sites/mysite.git

Move back to the Dijon Platform Developer Environment directory

cd ..

Copy in the config.php you have been given

cp ~/Downloads/dijon_config.php config.php

Build the Docker images

docker-compose build

Run the Docker environment

docker-compose up -d

Change file permissions

mkdir -p var/doctrine
sudo chmod -R 777 var

Connect to the Docker environment

docker exec -it dijon_php_1 bash

Install Composer


Install Composer dependencies

php composer.phar install

Setup your site

php vendor/bin/phinx migrate
php vendor/bin/phinx seed:run

Exit Docker environment


Add the site to the hosts database

Add the following to your /etc/hosts file, replace site with the name of your site.       admin.dijon.local       site.local.dijon.host

Congratulations your environment is set up.

On this page