-
Notifications
You must be signed in to change notification settings - Fork 1
Local development
To run Composer locally and pull in all the packages required for the website, you need to be able to connect to both our private repository and ACF PRO's repository. This requires authentication to be setup (one time only).
Our private repository is https://packagist.com/orgs/mojwb.
To add the correct authentication you can use Composers built in command. This updates your auth.json.
-
Login to 1Password and get the
username
,token
andlicence key
for the below. Then run the two composer config commands: -
Authenticate to packagist.com
composer config --global --auth http-basic.repo.packagist.com <username> <token>
-
Authenticate to ACF PRO
composer config --global --auth http-basic.connect.advancedcustomfields.com <LICENCE KEY> https://hale-platform-prod.apps.live.cloud-platform.service.justice.gov.uk
Make sure you have the .env.local
file with correct .env vars in the root of
this repository
- Create and install local TLS certs so the site runs on https.
- Run
Dory up
from within this repository. - Run
make build
. This builds the images required and all assets. - Run
make run
to launch the site on https://hale.docker
- Run
brew install mkcert
to install the mkcert app. - Run
mkdir -r /bin/certs
in the root of this repository, to create a new /certs folder in the bin/ directory. - In the /certs folder run
mkcert hale.docker
to create the certificates. - Run
mkcert -install
to apply certificates to your mac. - Make sure Dory is running
Dory up
. - Run
Make build
, to build the image and pull in the new cert pem files. - Go to your browser at the URL https://hale.docker
WordPress themes and plugins are loaded as part of the Docker image build. They are pulled into the build using PHP's Composer dependancy manager. To add or remove plugins, modify the composer.json file in the root of this directory.