git clone https://github.com/chapter-three/next-drupal
The database is not publicly available in the repo. You can ping @shadcn. I'll send you a copy.
cd drupal
composer install
- Create a
settings.local.php
file atdrupal/web/sites/default/settings.local.php
with the following:
<?php
// UPDATE THE DATABASE CONNECTION TO PULL FROM THE COPY ABOVE.
$databases['default']['default'] = array (
'database' => 'next_drupal',
'username' => 'root',
'password' => 'root',
'prefix' => '',
'host' => 'localhost',
'port' => '3306',
'namespace' => 'Drupal\\Core\\Database\\Driver\\mysql',
'driver' => 'mysql',
);
$settings['hash_salt'] = 'QHcBzdj7VmVv3fuoBKQzm9CDau80ugUUUewL89p0c38Tf8-WYz0pKXeMam3tLaGoJodflRlaUA';
$config['next.next_site.example_marketing']['base_url'] = 'http://localhost:3001';
$config['next.next_site.example_marketing']['preview_url'] = 'http://localhost:3001/api/preview';
$config['next.next_site.example_blog']['base_url'] = 'http://127.0.0.1:3030';
$config['next.next_site.example_blog']['preview_url'] = 'http://127.0.0.1:3030/api/preview';
$settings['trusted_host_patterns'] = [
'127.0.0.1$',
'^localhost$',
];
- From the
drupal
directory, rundrush rs 8080
to start the Drupal development server. - You can now visit
http://localhost:8080/user
and login with admin/admin to the Drupal site. - Visit
/admin/config/people/simple_oauth
and click on Generate Keys. - Enter
sites/default/files
for the directory.
- From the root of the next-drupal repo, run
yarn install
- Copy
examples/example-marketing/.env.example
toexamples/example-marketing/.env.local
- Run
yarn workspace example-marketing dev
- You can now visit the marketing site at
http://localhost:3001