Skip to content

strathos/drupal-starter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Drupal starter

Prerequisites

  • docker
  • docker-compose
  • git
  • make

Getting started

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 .git

Create project files with the following command:

make init

Now 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=8000

You 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 drupal

You 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.php

Put 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.php

This 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/.gitignore

Basic usage

Start the containers:

make up

Check status of the containers:

make ps

Stop and remove the container:

make down

Run Composer commands:

make composer -- --args command

Run Drush commands:

make drush -- --args command

Open a shell to the application container:

make shell

Pull images:

make pull

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published