- docker
- docker-compose
- git
- make
Start by creating a project directory and cloning this starter into it:
mkdir project-name && cd $_
git clone https://github.com/strathos/drupal-starter.git .
rm -rf .gitCreate project files with the following command:
make initNow you should have a .env file in your project directory. Edit it to match your environment, at least the following:
PROJECT_NAME=starter
PROJECT_BASE_URL=starter.local.test
PROJECT_PORT=8000You may also change the DB settings, but in a development environment those shouldn't matter that much.
At this point you don't have yet a hash salt, so leave that as dummy value for now.
Then install Drupal with the following command:
make drupalYou need to continue the installation in your web browser. The install script should print out the url where to connect.
The values are not pre-populated, so fill them with the same information you have in your .env file. NOTE! To change database hostname from localhost to something else, you need to click on the "Show advanced" option.
After the installation is done, check the created hash salt:
grep hash_salt src/web/sites/default/settings.phpPut this value to your .env file. Then copy the included settings.php file over the generated one:
chmod +w src/web/sites/default/settings.php
cp utils/settings.php src/web/sites/default/settings.phpThis settings file doesn't include anything that couldn't go to a public Git repository.
Now also copy a pre-configured .gitignore file to the src directory:
cp utils/web.gitignore src/.gitignoreStart the containers:
make upCheck status of the containers:
make psStop and remove the container:
make downRun Composer commands:
make composer -- --args commandRun Drush commands:
make drush -- --args commandOpen a shell to the application container:
make shellPull images:
make pull