This commit is contained in:
@@ -12,7 +12,7 @@ WORKDIR /opt/app
|
|||||||
COPY ./strapi/package.json ./strapi/package-lock.json ./
|
COPY ./strapi/package.json ./strapi/package-lock.json ./
|
||||||
|
|
||||||
# Install all dependencies (including devDependencies)
|
# 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 the rest of the Strapi app to a template directory
|
||||||
COPY ./strapi /opt/app-template
|
COPY ./strapi /opt/app-template
|
||||||
@@ -39,4 +39,4 @@ ENV ALLOWED_HOSTS=localhost
|
|||||||
EXPOSE 1337
|
EXPOSE 1337
|
||||||
|
|
||||||
ENTRYPOINT ["/entrypoint.sh"]
|
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 node_modules is missing, install dependencies
|
||||||
if [ ! -d node_modules ]; then
|
if [ ! -d node_modules ]; then
|
||||||
echo "node_modules not found, running npm ci..."
|
echo "node_modules not found, running npm ci..."
|
||||||
npm ci
|
yarn install
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exec "$@"
|
exec "$@"
|
||||||
|
|||||||
Reference in New Issue
Block a user