strapi
Build and Push Docker Images / build-and-push (push) Failing after 11s

This commit is contained in:
2025-05-08 16:31:21 +02:00
parent ccfd088cb4
commit c3ef6a98da
24 changed files with 18545 additions and 0 deletions
+34
View File
@@ -0,0 +1,34 @@
FROM node:22-alpine
# Install dependencies for sharp and other native modules
RUN apk update && apk add --no-cache build-base gcc autoconf automake zlib-dev libpng-dev nasm bash vips-dev git
# Set development environment
ENV NODE_ENV=development
WORKDIR /opt/app
# Copy only package.json and package-lock.json first for better caching
COPY ./strapi/package.json ./strapi/package-lock.json ./
# Install all dependencies (including devDependencies)
RUN npm ci
# Copy the rest of the Strapi app
COPY ./strapi ./
ENV DATABASE_CLIENT=postgres
ENV DATABASE_NAME=strapi
ENV DATABASE_HOST=postgres
ENV DATABASE_PORT=5432
ENV DATABASE_USERNAME=strapi
ENV DATABASE_PASSWORD=strapi
ENV JWT_SECRET=secret
ENV ADMIN_JWT_SECRET=secret
ENV APP_KEYS=secret
# No need to build in development mode
EXPOSE 1337
CMD ["npm", "run", "develop"]