Local Environment Setup¶
How to get a project running on your local machine from scratch.
Prerequisites¶
Install the following tools before starting:
- Git
- Docker + Docker Compose
- Node.js LTS (used for dotenv tooling)
- Composer (optional — only needed to run PHP commands locally)
1. Clone the repository¶
Initialize submodules (required for shared cronjobs and other submodule dependencies):
2. Start Docker¶
From the project root (not ./site or ./devops), build and start the containers:
Ensure the following containers are running: PHP, Nginx, MariaDB, and Redis (if applicable).
If the project uses a named Docker network, connect all containers to it:
List available networks:
3. Environment variables¶
To use .env.cloud with local encryption, navigate to the site directory and generate encryption keys:
Copy the staging key output and paste it into .env.cloud at the project root.
4. Initialize the local environment¶
Run the local deployment script from the project root:
This installs PHP and Node dependencies, compiles assets, and sets up the local release folder.