Skip to content

[2.2.0-RC1.1] Generate static content command still requires DB connection #10041

@jahvi

Description

@jahvi

Based on the technical details for the upcoming Magento 2.2 version it seems like you can generate static content without access to the DB, however it still seems to be trying to connect to the DB in my case.

Preconditions

  1. Magento 2.2 RC1.1 (3cfa32b)
  2. PHP 7.0.19

Steps to reproduce

  1. Clone latest develop branch
  2. Install Magento
  3. Run php bin/magento app:config:dump
  4. Rename env.php file to env2.php
  5. Run php bin/magento setup:static-content:deploy -l en_US -t Magento/blank -f

Expected result

  1. Static content should be deployed for the blank theme under en_US locale.

Actual result

Deploy using quick strategy


  [DomainException]
  Default website is not defined


setup:static-content:deploy [-f|--force] [-s|--strategy [STRATEGY]] [-a|--area [AREA]] [--exclude-area [EXCLUDE-AREA]] [-t|--theme [THEME]] [--exclude-theme [EXCLUDE-THEME]] [-l|--language [LANGUAGE]] [--exclude-language [EXCLUDE-LANGUAGE]] [-j|--jobs [JOBS]] [--symlink-locale] [--content-version CONTENT-VERSION] [--refresh-content-version-only] [--no-javascript] [--no-css] [--no-less] [--no-images] [--no-fonts] [--no-html] [--no-misc] [--no-html-minify] [--] [<languages>]...

If you rename the env.php file back it works fine. Am I missing something here?

I think I need to set the settings that Magento is trying to get from the DB in the env.php file of my build machine so it doesn't need to query the database but I'm not sure how.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions