magento / magento-cloud-docker

All Submissions you make to Magento Inc. (“Magento") through GitHub are subject to the following terms and conditions: (1) You grant Magento a perpetual, worldwide, non-exclusive, no charge, royalty free, irrevocable license under your applicable copyrights and patents to reproduce, prepare derivative works of, display, publically perform, sublicense and distribute any feedback, ideas, code, or other information (“Submission") you submit through GitHub. (2) Your Submission is an original work of authorship and you are the owner or are legally entitled to grant the license stated above. (3) You agree to the Contributor License Agreement found here: https://github.com/magento/magento2/blob/master/CONTRIBUTOR_LICENSE_AGREEMENT.html
Open Software License 3.0
256 stars 192 forks source link

unable to provide the crypt key when using the existing database #327

Open venkateshjiva opened 3 years ago

venkateshjiva commented 3 years ago

Hi Support,

I am creating the local instance with docker setup and used the database entry point to use the existing database for the application, when running the deploy command throwing the error like Missing Crypt key for upgrading magento, can you suggest how we can provide crypt key on docker configuration?

qaniel commented 3 years ago

Hello fellow Coder! Sadly it's not specified during the local docker installations but you need to have an existing mageroot/app/etc/env.php during the installation process. There you should add a crypt key.

    echo "<?php return array('cache'=> array ('frontend' => array ('default' => array ('backend' => 'Cm_Cache_Backend_Redis','backend_options' => array ('server' => 'redis','port' => '6379','database' => 1,),),'page_cache' => array ('backend' => 'Cm_Cache_Backend_Redis','backend_options' => array ('server' => 'redis','port' => '6379','database' => 2,),),),),'MAGE_MODE' => 'production','cron' => array ('enabled' => 0,),'crypt' =>array ('key' => '0000athirtytwocharacterstring000',),);" >> app/etc/env.php

here is a command to generate the env.php with crypt key, don't forget to use a different crypt key on you public store