diff --git a/Dockers/strapi/Dockerfile b/Dockers/strapi/Dockerfile index ab31ef5..e411048 100644 --- a/Dockers/strapi/Dockerfile +++ b/Dockers/strapi/Dockerfile @@ -12,7 +12,7 @@ WORKDIR /opt/app COPY ./strapi/package.json ./strapi/package-lock.json ./ # Install all dependencies (including devDependencies) -RUN npm ci +RUN npm i -g yarn # Copy the rest of the Strapi app to a template directory COPY ./strapi /opt/app-template @@ -39,4 +39,4 @@ ENV ALLOWED_HOSTS=localhost EXPOSE 1337 ENTRYPOINT ["/entrypoint.sh"] -CMD ["npm", "run", "develop"] +CMD ["yarn", "develop"] diff --git a/Dockers/strapi/entrypoint.sh b/Dockers/strapi/entrypoint.sh index 7d01b74..7352f09 100644 --- a/Dockers/strapi/entrypoint.sh +++ b/Dockers/strapi/entrypoint.sh @@ -12,7 +12,7 @@ cd /opt/app # If node_modules is missing, install dependencies if [ ! -d node_modules ]; then echo "node_modules not found, running npm ci..." - npm ci + yarn install fi exec "$@"