GithubHelp home page GithubHelp logo

Comments (6)

bliles avatar bliles commented on June 22, 2024

This is what I've come up with so far as part of the container startup to build the proper config files for Espo.

<?php

$config = include("/path/to/templates/config.php");
$config['siteUrl'] = getenv('ESPOCRM_SITE_URL');
file_put_contents("/var/www/html/data/config.php", "<?php\nreturn " . var_export($config, true) . ";\n");

$configInternal = include("/path/to/templates/config-internal.php");
$configInternal['database']['host'] = getenv('ESPOCRM_DATABASE_HOST');
$configInternal['database']['dbname'] = getenv('ESPOCRM_DATABASE_NAME');
$configInternal['database']['user'] = getenv('ESPOCRM_DATABASE_USER');
$configInternal['database']['password'] = getenv('ESPOCRM_DATABASE_PASSWORD');
$configInternal['passwordSalt'] = getenv('ESPOCRM_PASSWORD_SALT');
$configInternal['cryptKey'] = getenv('ESPOCRM_CRYPT_KEY');
$configInternal['hashSecretKey'] = getenv('ESPOCRM_HASH_SECRET_KEY');

file_put_contents("/var/www/html/data/config-internal.php", "<?php\nreturn " . var_export($configInternal, true) . ";\n");

from espocrm-docker.

tmachyshyn avatar tmachyshyn commented on June 22, 2024

Hello,

You can define these parameters while creating the container. Please see https://hub.docker.com/r/espocrm/espocrm under Installation Environments section.
Also, you can change any config option (string, integer, boolean) by using Config Environments. See https://hub.docker.com/r/espocrm/espocrm.

from espocrm-docker.

bliles avatar bliles commented on June 22, 2024

I found that using the method you mention resulted in Espo doing an install during container start. The install process generated new cryptKey, passwordSalt and hashSecretKey values. These values need to remain consistent between deploys to the same environment/multiple nodes in the same cluster.

from espocrm-docker.

tmachyshyn avatar tmachyshyn commented on June 22, 2024

In this case, you have to create a data/config.php file before starting the installation process in the way you described above.

from espocrm-docker.

mich3000 avatar mich3000 commented on June 22, 2024

In this case, you have to create a data/config.php file before starting the installation process in the way you described above.

Hello,

You can define these parameters while creating the container. Please see https://hub.docker.com/r/espocrm/espocrm under Installation Environments section. Also, you can change any config option (string, integer, boolean) by using Config Environments. See https://hub.docker.com/r/espocrm/espocrm.

Version 7 also uses config-internal.php. How can i set parameters in docker-compose for that file.
Thanks

from espocrm-docker.

tmachyshyn avatar tmachyshyn commented on June 22, 2024

This is automatically defined on the EspoCRM side. All items in the systemItems will be added to the config-internal.php.
If you need some extra parameters to be added to the config-internal.php, you have to add to config.php the code:

'systemItems' => [
    '__APPEND__',
    'YOUR_PARAMETER'
],

from espocrm-docker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.