Skip to content

Latest commit

 

History

History
73 lines (49 loc) · 2.04 KB

README.md

File metadata and controls

73 lines (49 loc) · 2.04 KB

Enter Project name

Enter project description - This is starter template for drupal 9 development.

Dev environment with docker4drupal

When starting for the first time copy the override-sample file and update as needed

cp compose.override-sample.yml compose.override.yml

Also update the .env file with your project name. Then start up docker-compose

docker-compose up -d

# OR

make up

You may like to copy the sample README instead of using this one in your new project

cp README-sample.md README.md

Then install the drupal application into the drupal folder. Note this project is set up to work with the webroot in the drupal/web folder. If you use another folder pls update the NGINX_SERVER_ROOT section in the docker-compose.override.yml file. You can use the settings.default.php as an option for your settings.php file. This file will be committed and will define the base configs for all environments.

cp settings.default.php drupal/web/sites/default/settings.php

The settings.docker.php file will map into the docker environment as a settings.local.php file for environment specific configs. This is a good place to put sensitive configs (not for commiting to git) such as passwords. On production you can create a settings.local.php and override the configs.

Once installed you can access the dev site on port 8000. e.g. localhost:8000

Common commands

# start up dev environment
docker compose up -d #OR make

# stop environment
docker compose stop #OR make stop

# delete everything and start in a clean environment
docker compose down -v #OR make down

# check logs
docker compose logs -f #OR make logs

# check logs for specific container
docker compose logs -f php #OR make logs php

# log into php container (this will allow use of drush and composer)
docker compose exec php sh #OR make shell

Tests