Problem/Motivation
Im working my local site with DDEV enviroment so I try to install and test Vardoc with it.
I know may be the problem is with DDEV but i want to get the discusion here to may be document the solution here.
Steps to reproduce
I try to install Vardoc with this commands in terminal:
mkdir vardoc
cd vardoc
ddev config --project-type=drupal8 --docroot=web --create-docroot
ddev start
ddev composer create vardot/vardoc-project:~4 --no-dev --no-interaction
ddev composer require drush/drush
ddev launch
When I applie the command:
ddev composer create composer create-project vardot/vardoc-project:~4 --no-dev --no-interaction
All the files download, even get a create database and all docker image DDEV create.
Then I go to the adress :https://vardoc.ddev.site/
and get a
403 Forbidden
I cant see any site.
If I run the command:
ddev exec drush ws
I get this errors:
Drupal\Core\DependencyInjection\ContainerNotInitializedException: \Drupal::$container is not initialized yet. \Drupal::setContainer() must be called with a real container. in /var/www/html/docroot/core/lib/Drupal.php on line 130 #0 /var/www/html/docroot/core/lib/Drupal.php(518): Drupal::getContainer()
#1 phar:///usr/local/bin/drush8/commands/core/drupal/environment_common.inc(101): Drupal::moduleHandler()
#2 phar:///usr/local/bin/drush8/lib/Drush/Boot/DrupalBoot.php(242): drush_module_exists('dblog')
#3 phar:///usr/local/bin/drush8/lib/Drush/Boot/DrupalBoot.php(73): Drush\Boot\DrupalBoot->drush_enforce_requirement_drupal_dependencies(Array)
#4 phar:///usr/local/bin/drush8/lib/Drush/Boot/BaseBoot.php(60): Drush\Boot\DrupalBoot->enforce_requirement(Array)
#5 phar:///usr/local/bin/drush8/includes/preflight.inc(67): Drush\Boot\BaseBoot->bootstrap_and_dispatch()
#6 phar:///usr/local/bin/drush8/includes/startup.inc(465): drush_main()
#7 phar:///usr/local/bin/drush8/includes/startup.inc(369): drush_run_main(false, '/', 'Phar detected. ...')
#8 phar:///usr/local/bin/drush8/drush(114): drush_startup(Array)
#9 /usr/local/bin/drush8(10): require('phar:///usr/loc...')
#10 {main}
Drupal\Core\DependencyInjection\ContainerNotInitializedException: \Drupal::$container is not initialized yet. \Drupal::setContainer() must be called with a real container. in Drupal::getContainer() (line 130 of /var/www/html/docroot/core/lib/Drupal.php).
Drush command terminated abnormally due to an unrecoverable error. [error]
Failed to execute command drush ws: exit status 1
I believe the installation it is not done correctly.
If I go inside Directory of the instalation I get this structure of directories:
.ddev
.editorconfig
.gitattributes
.gitignore
LICENSE
README.md
bin
composer.json
composer.lock
docroot
vendor
web
This docroot is strange because in other projects with DDEV and Drupal I dont get this folder, and looks like in this folder there is de Drupal instalation.
A simple guess is I need to tell in the installation this command:
ddev composer create composer create-project vardot/vardoc-project:~4 web --no-dev --no-interaction
to get the PROJECT_DIR_NAME with the name web.
But is only a guess.
I hope someone try first to install Vardoc in DDEV and give my sone ligth about it.
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | vardosisntall.png | 63.49 KB | koffer |
Comments
Comment #2
joachim namysloFirs of all tell us a bit mpre about your environment. Do you use Windows 10, Mac, Linux, whn useing ddev?
Comment #3
koffer commentedIm using DDEV in Mac
Comment #4
joachim namysloOh thats a pity.I do not own one, so I simply can't reproduce and debug that issue. Hello? Community? Any Mac Enthusiast here to help out with this one?
Comment #5
koffer commentedI believe isnt a problem with macos. My main guess is about composer commands. Im not sure if this is the correct way to install this distribution with DDEV.
Comment #6
joachim namysloI don't have any Mac but for me in general ddev is not the best way to do anything. At least when you develop a product. Installing Varbase on a regular Lamp stak by using lamp or installing even apache2 php 7.4 and marinade from Mac repos or with brew would be far easier than anything else. Especially when it comes to debugging stuff. So maybe you should consider to put ddev back on the shelf.
Composer itself works on Mac. Varbase itself has no issues so far.
But everytime I read such Issues like this regardless if a Mac user or a windows user writes them, I am facing the same two problems again and over again.
X does not work with y please can you help me often leads to:
No I cannot help you. There is a standard way the Internet works since the 90s It's called Linux Php Apache and Mysql.
That's the only environment I know drupal and it's toolchain work like a charm with. Even on Windows I use Virtualbox with Linux and a Lamp Stack on it. Just because it works. Yes there are docker, ddev, kubernetes, openstack, vagrant, und a hundred more tools you can run Drupal with. But why should you do.
If Varbase doesn't work out of the box with ddev like ot does on a standard Linux install ddev itself is a mess and not worth to use it. Just because debugging problems is taking time you could invest to create a better experience for your users onsite.
So in one sentence. If ddev doesn't work out of the box with Varbase. Drop ddev.
Comment #7
mmjvb commentedNot using ddev, but it looks like you are doing things wrong.
The command should be:
ddev composer create-project "vardot/vardoc-project:~4"
The options you used are not needed, "create-project" can be "create" but recommend using the full command rather than relying on the shortcut.
Suspect you need --docroot=docroot instead of --docroot=web as vardoc-project is a project that uses docroot rather than web. This might explain the security issue.
Comment #8
koffer commentedComment #9
koffer commentedThanks a lot for all the comment.
Like mmjvb say the problem was in:
So I change this configuration step in ddev and now I install Vardoc with this commands:
I want to add a solution so if someone need to install Vardoc with DDEV can find a solution.