Initial commit
Deploy / validate-dispatch (push) Successful in 43s
Deploy / scheduled-rebuild-dev (push) Skipped
Deploy / scheduled-rebuild-master (push) Skipped
Deploy / rollback-dev (push) Skipped
Deploy / rollback-master (push) Skipped
Deploy / changes (push) Successful in 13s
Deploy / secret-scan (push) Successful in 9s
Deploy / app-quality (push) Successful in 11m21s
Deploy / security-deps (push) Successful in 14s
Deploy / context (push) Failing after 1s
Deploy / app-image (push) Skipped
Deploy / deploy-dev (push) Skipped
Deploy / deploy-master (push) Skipped
Deploy / validate-dispatch (push) Successful in 43s
Deploy / scheduled-rebuild-dev (push) Skipped
Deploy / scheduled-rebuild-master (push) Skipped
Deploy / rollback-dev (push) Skipped
Deploy / rollback-master (push) Skipped
Deploy / changes (push) Successful in 13s
Deploy / secret-scan (push) Successful in 9s
Deploy / app-quality (push) Successful in 11m21s
Deploy / security-deps (push) Successful in 14s
Deploy / context (push) Failing after 1s
Deploy / app-image (push) Skipped
Deploy / deploy-dev (push) Skipped
Deploy / deploy-master (push) Skipped
This commit is contained in:
+69
@@ -0,0 +1,69 @@
|
||||
# syntax=docker/dockerfile:1.7
|
||||
FROM node:24-slim AS build
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY package*.json ./
|
||||
RUN npm ci
|
||||
|
||||
COPY . .
|
||||
|
||||
ARG APP_NAME="Example Website"
|
||||
ARG APP_URL="https://example.com"
|
||||
ARG COMPANY_NAME="Example Company"
|
||||
ARG CONTACT_EMAIL="info@example.com"
|
||||
ARG CONTACT_PHONE="+49 000 000000"
|
||||
ARG CONTACT_ADDRESS="Example Street 1, 12345 Example City"
|
||||
ARG SKIP_IMAGE_OPTIMIZATION=false
|
||||
ARG IMAGE_CACHE_NAMESPACE=shared
|
||||
ENV APP_NAME=${APP_NAME} \
|
||||
APP_URL=${APP_URL} \
|
||||
COMPANY_NAME=${COMPANY_NAME} \
|
||||
CONTACT_EMAIL=${CONTACT_EMAIL} \
|
||||
CONTACT_PHONE=${CONTACT_PHONE} \
|
||||
CONTACT_ADDRESS=${CONTACT_ADDRESS}
|
||||
ENV NEXT_TELEMETRY_DISABLED=1
|
||||
|
||||
RUN --mount=type=cache,id=website-starter-image-assets-${IMAGE_CACHE_NAMESPACE},target=/image-cache,sharing=locked \
|
||||
IMAGE_CACHE_ROOT=/image-cache \
|
||||
SKIP_IMAGE_OPTIMIZATION=${SKIP_IMAGE_OPTIMIZATION} \
|
||||
npm run build
|
||||
|
||||
FROM node:24-slim AS runtime
|
||||
|
||||
# Apply Debian security updates that may not yet be included in the Node base
|
||||
# image. Clear package metadata in the same layer so it is not part of the
|
||||
# runtime image.
|
||||
# The server starts with Node directly and does not need npm at runtime. Removing
|
||||
# npm also keeps its build-only dependency tree out of the production image.
|
||||
RUN apt-get update \
|
||||
&& apt-get upgrade -y \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& rm -rf /usr/local/lib/node_modules/npm \
|
||||
/usr/local/bin/npm \
|
||||
/usr/local/bin/npx
|
||||
|
||||
ARG BUILD_DATE=""
|
||||
ARG VCS_REF=""
|
||||
ARG SOURCE_URL="https://example.com/repository"
|
||||
LABEL org.opencontainers.image.created="$BUILD_DATE" \
|
||||
org.opencontainers.image.revision="$VCS_REF" \
|
||||
org.opencontainers.image.source="$SOURCE_URL" \
|
||||
org.opencontainers.image.title="website-starter"
|
||||
|
||||
ENV NODE_ENV=production \
|
||||
NEXT_TELEMETRY_DISABLED=1 \
|
||||
HOSTNAME=0.0.0.0 \
|
||||
PORT=3000
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY --from=build --chown=node:node /app/.next/standalone ./
|
||||
COPY --from=build --chown=node:node /app/.next/static ./.next/static
|
||||
COPY --from=build --chown=node:node /app/public ./public
|
||||
|
||||
USER node
|
||||
EXPOSE 3000
|
||||
|
||||
CMD ["node", "server.js"]
|
||||
Reference in New Issue
Block a user