This commit is contained in:
@@ -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"]
|
||||
|
||||
@@ -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 "$@"
|
||||
|
||||
Reference in New Issue
Block a user