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

How to upgrade the application correctly #9

Open
zentavr opened this issue Jan 2, 2023 · 5 comments
Open

How to upgrade the application correctly #9

zentavr opened this issue Jan 2, 2023 · 5 comments

Comments

@zentavr
Copy link

zentavr commented Jan 2, 2023

Hi,

There are lines at the docker-entrypoint file:

elif [ ! -d "node_modules" ] || [ ! "$(ls -qAL node_modules 2>/dev/null)" ]; then
if [ -f "yarn.lock" ]; then
echo "Node modules not installed. Installing using yarn ..."
yarn install --prod --silent
else
echo "Node modules not installed. Installing using npm ..."
npm install --only=prod --silent
fi

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?

@naskio
Copy link
Owner

naskio commented Jan 2, 2023

Why not just upgrading the docker image ?

@zentavr
Copy link
Author

zentavr commented Jan 2, 2023

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

@zentavr
Copy link
Author

zentavr commented Jan 2, 2023

@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

@cplepage
Copy link

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 ?

@zentavr
Copy link
Author

zentavr commented Apr 30, 2023

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.

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

No branches or pull requests

3 participants