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

lando symfony command result in an error #16

Open
flovntp opened this issue Jan 19, 2023 · 2 comments
Open

lando symfony command result in an error #16

flovntp opened this issue Jan 19, 2023 · 2 comments

Comments

@flovntp
Copy link

flovntp commented Jan 19, 2023

Hi Lando Team,
I'm using latest 3.9.0 version and in the list of available commands, one is about symfony.
I know that for running Symfony commands within the app container, we need to use lando console
but still, why is it listed as a valid command but raising a not found error ?

platformsh-symfony-template % lando         
Usage: lando <command> [args] [options]

Commands:
... 
  lando symfony           Runs symfony commands
... 
platformsh-symfony-template % lando version 
v3.9.0
platformsh-symfony-template % lando symfony 
/bin/sh: 1: symfony: not found
platformsh-symfony-template % 

BTW, I'm trying to add a README file with Lando instructions (local development) to use our Platform.sh Symfony template locally...
and BTW, great job, Lando is working well.

@pirog pirog removed the symfony label Jan 19, 2023
@pirog pirog transferred this issue from lando/lando Jan 19, 2023
@jibla
Copy link

jibla commented Mar 21, 2023

I also faced the same issue.

After you just create .lando.yml file with symfony recipe and run lando start, you can't run landy symfony simply because Symfony CLI is not installed inside the container, even though it is listed as a tooling command.

As a workaround, you can install symfony manyally in the container with the following commands:

# first ssh into the container as a root
lando ssh --service appserver --user root
# then install the symfony cli according to their installation guide
curl -1sLf 'https://dl.cloudsmith.io/public/symfony/stable/setup.deb.sh' | bash
apt install symfony-cli

After this, if you log out from the container and run lando symfony it should work.

Generally, I think the proper solution to this issue is that, recipe should install symfony cli in the container somehow (I am not aware of the internals of lando library and don't know how to achieve that exactly).

@jibla
Copy link

jibla commented Mar 22, 2023

The better way is to put these commands in build_as_root to run on every rebuild.

Like this:

services:
  appserver:
    build_as_root:
      - curl -1sLf 'https://dl.cloudsmith.io/public/symfony/stable/setup.deb.sh' | bash
      - apt install symfony-cli

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants