Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kburakozdemir/lando-drupal9-recipe
Quick Start for Drupal 9 and Lando
https://github.com/kburakozdemir/lando-drupal9-recipe
drupal drupal9 lando
Last synced: about 1 month ago
JSON representation
Quick Start for Drupal 9 and Lando
- Host: GitHub
- URL: https://github.com/kburakozdemir/lando-drupal9-recipe
- Owner: kburakozdemir
- License: unlicense
- Created: 2021-06-23T10:29:56.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-12-19T08:01:21.000Z (about 2 years ago)
- Last Synced: 2024-11-08T00:06:55.825Z (3 months ago)
- Topics: drupal, drupal9, lando
- Homepage:
- Size: 23.4 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Quick Start for Drupal 9 and Lando
All of the bash commands in this document must be run in repo root.
After cloning the repo, you're free to delete the `.git` directory.
```bash
rm -rf ./.git/
```## Prepare Code base
```bash
lando start
```After starting Lando, you will see the URLs. Please do not visit them at this moment.
![URLs](https://i.imgur.com/LlN94Ls.png)
Continue running the command below:
```bash
lando composer create-project drupal/recommended-project:^9 /app/temp --no-installrsync -rtv --remove-source-files ./temp/ ./drupal/
find ./temp -type d -empty -delete # or run `rm -rf ./temp/`
rm ./drupal/web/.gitkeep
lando composer install # do not forget to confirm plugins when prompted
```Note: This is resolved. Please see [Composer v2.2 prompts to authorize plugins](https://www.drupal.org/project/drupal/issues/3255749) and [Composer 2.2+ Authorized Plugins](https://www.drupal.org/node/3294646).
![Allow plugins](https://i.imgur.com/AKjMevW.png)
Install drush
```bash
lando composer require "drush/drush"# Test drush
lando drush --version
```## Install Site
### Manual Installation via Browser
You can now visit the URLs mentioned above and perform an installation via browser:
![Drupal Installation](https://i.imgur.com/M3YcTOL.png)
### Automated Installation via drush
#### Standard Drupal Installation
This will perform a standard Drupal installation:
```bash
# Ref: https://drushcommands.com/drush-9x/site/site:install/
# drush si --db-url=mysql://root:pass@localhost:port/dbname
lando drush site-install \
standard \
--site-name='Drupal using Lando' \
--locale=en \
--db-url=mysql://drupal9:drupal9@database:3306/drupal9 \
--account-name=admin \
--account-pass=admin \
--yes
```#### Standard Drupal Installation in Another Language
If you want to perform a standard Drupal installation with a different language, change the `locale` option (in this example `tr` (Turkish) is used):
```bash
# Ref: https://drushcommands.com/drush-9x/site/site:install/
# drush si --db-url=mysql://root:pass@localhost:port/dbname
lando drush site-install \
standard \
--site-name='Drupal using Lando' \
--locale=tr \
--db-url=mysql://drupal9:drupal9@database:3306/drupal9 \
--account-name=admin \
--account-pass=admin \
--yes
```#### Install Umami Demo Profile
This is a multi-lingual Drupal demo containing realistic content:
```bash
# Ref: https://drushcommands.com/drush-9x/site/site:install/
# drush si --db-url=mysql://root:pass@localhost:port/dbname
lando drush site-install \
demo_umami \
--site-name='Umami Food Magazine' \
--db-url=mysql://drupal9:drupal9@database:3306/drupal9 \
--account-name=admin \
--account-pass=admin \
--yes
```## Admin Interface
Visit `https://dev-drupal9.lndo.site/user/login`.
If 'Automated Installation via drush' is used for installation, use `admin` for both username and password.
## Environment Information
The operating system and other software used are as follows:
```txt
lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.4 LTS
Release: 20.04
Codename: focallando version
v3.6.4docker --version
Docker version 20.10.17, build 100c701docker-compose --version
docker-compose version 1.29.1, build c34c88b2
```