What are the Slack Archives?

It’s a history of our time together in the Slack Community! There’s a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.

Because this space is not active, you won’t be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..

Hi, I'm having trouble using the docker/sdk after having modified composer.json (I've installed midd

USPRPK45Q
USPRPK45Q Posts: 4 πŸ§‘πŸ»β€πŸš€ - Cadet

Hi, I'm having trouble using the docker/sdk after having modified composer.json (I've installed middleware/process), since spryker will build the container using default autoload.php.
Can anybody tell me the best way to use local composer.json in docker/sdk.

Comments

  • UKHD8KTMF
    UKHD8KTMF Posts: 393 πŸ§‘πŸ»β€πŸš€ - Cadet

    What exactly is the issue? Did you add middleware namespace to config $config[KernelConstants::CORE_NAMESPACES]

  • USPRPK45Q
    USPRPK45Q Posts: 4 πŸ§‘πŸ»β€πŸš€ - Cadet
    edited March 2020

    The issue in fact is, that if I check out my working changes and do a docker/sdk up on another machine docker/sdk up will crash because it will not use the changed local composer.json but afaik an unchanged one from spryker repo.

  • UKHD8KTMF
    UKHD8KTMF Posts: 393 πŸ§‘πŸ»β€πŸš€ - Cadet

    hmm, this sounds strange. I might as a stupid question here, but does other machine use the same code? Did you commit also composer lock file?

  • i am also not 100% clear here πŸ€”

  • can you detail your steps again, @USPRPK45Q?

  • sprymiker
    sprymiker Cloud Platform Architect Sprykee Posts: 781 πŸ§‘πŸ»β€πŸš€ - Cadet

    @USPRPK45Q Please, describe the flow of commands you do to up Spyker.

    Do you bootstrap with deploy.dev.yml file?

  • USPRPK45Q
    USPRPK45Q Posts: 4 πŸ§‘πŸ»β€πŸš€ - Cadet

    I bootstrap a deploy.stage.yml on the server, only difference to my dev.yml is endpoints, debug, and mount option (baked on stage).
    Locally I required spryker-middleware/process and developed a feature, when i deploy on server and bootstrap again and docker/sdk up, Spryker installation fails when generating propel models.

  • sprymiker
    sprymiker Cloud Platform Architect Sprykee Posts: 781 πŸ§‘πŸ»β€πŸš€ - Cadet
    edited March 2020

    baked means the codebase is backed into docker image, so you cannot expect file you changed on your host appears there.

    You can run docker/sdk up again and the changes will appear. It would take a few minutes.

    Or you can switch to native or docker-sync (depends on platform you use) to have possibility to see changes on-fly

  • sprymiker
    sprymiker Cloud Platform Architect Sprykee Posts: 781 πŸ§‘πŸ»β€πŸš€ - Cadet
    edited March 2020

    If your changes are not often and do not performed in vendor folder you can use backed mode. The only downside is the delay to see the changes (and running additional command). For me it is about 2 minutes to see.

  • USPRPK45Q
    USPRPK45Q Posts: 4 πŸ§‘πŸ»β€πŸš€ - Cadet

    I understand what baked does but I cannot rebuild th container without the above error occuring

  • sprymiker
    sprymiker Cloud Platform Architect Sprykee Posts: 781 πŸ§‘πŸ»β€πŸš€ - Cadet

    What exactly error do you have?

  • sprymiker
    sprymiker Cloud Platform Architect Sprykee Posts: 781 πŸ§‘πŸ»β€πŸš€ - Cadet

    Also please list .dockerignore