Skip to content
This repository has been archived by the owner on Oct 4, 2023. It is now read-only.

Feature/env init Magento cloud update #153

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

henriquekieckbusch
Copy link

A few updates to den env-init name magento-cloud command.

  • It creates the app/etc/env.php (it gets the original one, it makes a backup and it injects the file magento2-config.env in it)
  • If it detects multi-store, it creates the app/etc/stores.php (and adds the URLs to the env.php as well)

@navarr navarr self-assigned this Nov 7, 2022
@navarr navarr self-requested a review November 7, 2022 16:04
@navarr navarr added the enhancement New feature or request label Nov 7, 2022
@navarr navarr added this to the v1 milestone Nov 7, 2022
Comment on lines +1 to +4
function :: {
echo
echo "==> [$(date +%H:%M:%S)] $@"
}
Copy link

Choose a reason for hiding this comment

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

We don't currently use this pattern anywhere, so I'm not sure we should start adopting it now

If we were, it should also be in the utility file - not in the individual command

Copy link
Author

Choose a reason for hiding this comment

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

yeah, it makes sense.. let me remove it... I got the idea from here: https://github.com/davidalger/warden-env-magento2/blob/develop/.warden/commands/bootstrap.cmd

function createEnvPhpFile {
mkdir -p app/etc
ENV_PHP=$(magento-cloud ssh --project=$PROJECT --environment=$ENVIRONMENT php <<CODE
<?Php
Copy link

Choose a reason for hiding this comment

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

Suggested change
<?Php
<?php

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
Status: Todo
Development

Successfully merging this pull request may close these issues.

2 participants