- Create
.env
based on.env.example
. - Start docker containers:
- for prod:
docker compose -f docker-compose.yml -f docker-compose.prod.yml up -d
- for local-dev:
docker compose up -d
- after changes to Dockerfile
docker compose build
is required to rebuild image
- for prod:
- Install composer dependencies:
docker exec -it <drupal_container> composer install
- Import database (optional)
- for prod:
docker compose -f docker-compose.yml -f docker-compose.prod.yml up -d
- for local-dev:
docker compose up -d
docker compose down
docker compose ps
docker exec -i <db_container> mysql -u<user> -p<pass> <database> < dump.sql
docker exec -it <drupal_container> vendor/bin/drush ...
docker exec -it <drupal_container> composer ...