Calling Developers!
We are reenergizing our code contribution process! Learn More

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..

I would like to have a general approach how to update spryker in docker enviroment. And not to dest

Options
UKTEVG9L4
UKTEVG9L4 Posts: 38 🧑🏻‍🚀 - Cadet

I would like to have a general approach how to update spryker in docker enviroment.

And not to destory the container every time. Loosing the database and installing againg.

Comments

  • Hi Robert,

    Let me clarify your setup and what you are trying to achieve.

    So, as I understand, you have DB instance inside a container and NOT as a managed service, right?
    Are you talking about local development environment or production?

  • UKTEVG9L4
    UKTEVG9L4 Posts: 38 🧑🏻‍🚀 - Cadet
    Options

    Hi @UPZH5HHEV

    i would like to solve both environments.
    And yes my setup is totally build with the docker/sdk.

    Thanks

  • UKTEVG9L4
    UKTEVG9L4 Posts: 38 🧑🏻‍🚀 - Cadet
    Options

    ???

  • I am asking for more time to evaluate this topic. I need to discuss this with my team first. And I will come back to you soon

  • Robert, I forgot to ask.
    Are you using PostgreSQL or MySQL?

  • Hi Robert,

    Small update from our side.
    At the moment, there is no support for updating DB versions AND keeping the data in docker-sdk.

    But you can try to use the following guidelines to do that manually:
    PostgreSQL:

    1. docker exec spryker_demo_database_1 pg_dumpall -U root > dump.sql
    2. docker/sdk down
    3. docker volume rm spryker_demo_database-postgres-data
    4. Change version into docker/deployment/default/docker-compose.yml for database
    5. docker/sdk run
    6. docker cp dump.sql spryker_demo_database_1:/var/lib/postgresql/data
    7. docker exec -it spryker_demo_database_1 bash
    8. psql -U root < /var/lib/postgresql/data/dump.sql
    

    For MySQL:

    1. Change version into docker/deployment/default/docker-compose.yml for database
    2. Change config volume:-  ./${DEPLOYMENT_PATH}/context/mysql/my.cnf:/etc/mysql/mysql.conf.d/my.cnf:ro
    3. docker/sdk run
    

    I hope this helps.
    And thank you for your questions. We will consider this functionality to be part of our product.

    Dmytro

  • And of course, when you update your local setup and only project code is involved, then only the required images will be rebuilt (e.g. Yves, Zed)