Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support disabling DEV_MODE on Docker #27138

Merged

Conversation

boubkerbribri
Copy link
Contributor

Questions Answers
Branch? develop
Description? Support disabling DEV_MODE on Docker
Type? refacto
Category? TE
BC breaks? no
Deprecations? no
Fixed ticket? no
How to test? docker-compose uo --build
Possible impacts?

This change is Reviewable

@boubkerbribri boubkerbribri added the CI/CD Continuous Integration / Continuous Delivery label Dec 29, 2021
@boubkerbribri boubkerbribri added this to the 8.0.0 milestone Dec 29, 2021
@boubkerbribri boubkerbribri requested a review from a team as a code owner December 29, 2021 15:37
@prestonBot prestonBot added develop Branch Refactoring Type: Refactoring labels Dec 29, 2021
@boubkerbribri boubkerbribri changed the title support disabling DEV_MODE on Docker Support disabling DEV_MODE on Docker Dec 29, 2021
Copy link
Contributor

@PierreRambaud PierreRambaud left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I approve but one day it could be cool to use defines_custom.inc.php which aim to do this instead of using sed

@boubkerbribri boubkerbribri added the QA ✔️ Status: check done, code approved label Dec 29, 2021
@PierreRambaud PierreRambaud merged commit 7b885e5 into PrestaShop:develop Dec 29, 2021
@PierreRambaud
Copy link
Contributor

Thank you @boubkerbribri

@PierreRambaud PierreRambaud deleted the docker/support-DEV_MODE branch December 29, 2021 17:37
@@ -30,6 +30,11 @@ fi
# From now, stop at error
set -e

if [ $PS_DEV_MODE -ne 1 ]; then
echo "\n* Disabling DEV mode ...";
sed -ie "s/define('_PS_MODE_DEV_', true);/define('_PS_MODE_DEV_',\ false);/g" /var/www/html/config/defines.inc.php
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@boubkerbribri just wondering, why did you use -ie flag which generates defines.inc.phpe file? Is this supposed to be a backup? What's the point of that?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's an error that slipped away here

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm making a PR for the config so I'll fix that too :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI/CD Continuous Integration / Continuous Delivery develop Branch QA ✔️ Status: check done, code approved Refactoring Type: Refactoring
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants