docker-strapi icon indicating copy to clipboard operation
docker-strapi copied to clipboard

How to upgrade the application correctly

Open zentavr opened this issue 2 years ago • 5 comments

Hi,

There are lines at the docker-entrypoint file: https://github.com/naskio/docker-strapi/blob/5b24cf823acd67d96f6a02135d09b1b98937bfbf/images/strapi-alpine/docker-entrypoint.sh#L25-L37

If we upgrade strapio to the newer version, docker-entrypoint sees that the node_modules folder exists and wont install the upgrades if there are any. How to perform here correctly?

zentavr avatar Jan 02 '23 19:01 zentavr

Why not just upgrading the docker image ?

naskio avatar Jan 02 '23 20:01 naskio

@naskio this is obvious actually. I'm just wondering how to upgrade all those modules (if needed) when I upgrade docker image?

zentavr avatar Jan 02 '23 20:01 zentavr

@naskio I'm currently building the Helm Chart which installs strapi.io (testing that with K8S in AWS EKS). We are going to have shared NFS folder between the pods, that's why I'm asking.

The code of the helm chart (WIP) is here

zentavr avatar Jan 02 '23 22:01 zentavr

Why not just upgrading the docker image ?

If we pull the newer image, but reuse the same volume for /srv/app that contains the .../public/uploads and ../src/api directories which are vitals for data persistence. Then with the line pointed out by @zentavr, even with a pull, the node_modules won't update and neither the strapi version.

Or maybe I am missing something ?

cplepage avatar Apr 30 '23 03:04 cplepage

Right now we are building our own image. We use current image in development mode in order to create the collections (which creates the files in the src/api folder. Then we commit that into git and have ci/cd pipeline on top of that which runs in AWS Codepileline and builds and spins up the image from our personal repository.

probably we changed dockerfile and an entry point for that.

zentavr avatar Apr 30 '23 08:04 zentavr