skip to Main Content

For the continuous integration and deployment of websites, I am using this pipeline:

enter image description here

But for many CMS like wordpress, prestashop, magento and others, the configuration of the website and the installation of plugins is done in the back-office of the deployed website.

For now, I am building the docker image on top of the CMS base image, then replacing all the /var/html directory with the files in github. Then Kubernetes is deploying the containers and plug a database and a persistent storage


Hence, this is breaking my pipeline: imagine that someone is installing and configuring a plugin in the back-office, then someone else is doing a modification on a file and pushes it to github. The github repo doesn’t have the info that a plugin was installed and will build and deploy a new image without it.

How to integrate all the modifications done in the back-office in my github repository?

2

Answers


  1. The solution we use is an override of the DB class.

    So we monitor a number of tables (Configuration, module, hook, etc …) and we store all queries about it in a sql file.

    So during commit, we also have a .sql actions to perform on the database side.

    Once deployed, either you manually execute the sql, or a script detect that new SQL are present and executes.

    In this way we are always up to date.

    This solution we developed in the form of Prestashop modules to track all actions.

    Regards

    Login or Signup to reply.
  2. My (by any means not ideal) working solution:

    1. Create plugins folder outside docker and symlink this folder in dockered /wp-content/plugins
    2. recreate above in production
    3. Then installing new plugin doesn’t break CI flow but requires two independent installations and configurations, if you (or dev team) need to install something new.

    So you basically treat plugin files same way as you already do it with DB.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search