Skip to content

Commit

Permalink
fix: sharp incompatibility with qemu cpu
Browse files Browse the repository at this point in the history
  • Loading branch information
Reynadi531 committed Aug 4, 2024
1 parent 48a93df commit 1802985
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 27 deletions.
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ RUN \
fi

FROM --platform=linux/amd64 node:20-alpine AS builder
ARG DATABASE_URL
ARG NEXT_PUBLIC_CLIENTVAR
WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
COPY . .

ENV NEXT_TELEMETRY_DISABLED=1
ENV VIPS_NOVECTOR=0


RUN \
if [ -f yarn.lock ]; then SKIP_ENV_VALIDATION=1 yarn build; \
Expand All @@ -33,6 +33,7 @@ WORKDIR /app
ENV NODE_ENV=production

ENV NEXT_TELEMETRY_DISABLED=1
ENV VIPS_NOVECTOR=0

COPY --from=builder /app/next.config.mjs ./
COPY --from=builder /app/public ./public
Expand Down
52 changes: 27 additions & 25 deletions next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,38 +1,40 @@
import { withContentlayer } from 'next-contentlayer';
import sharp from 'sharp';

sharp.simd(false);

/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
poweredByHeader: false,
output: 'standalone',
reactStrictMode: true,
poweredByHeader: false,
output: 'standalone',

images: {
remotePatterns: [
{
protocol: "https",
hostname: "assets.reynadi.com"
}
]
},
images: {
remotePatterns: [
{
protocol: 'https',
hostname: 'assets.reynadi.com',
},
],
},

headers() {
return [
{
source: '/(.*)',
headers: securityHeaders,
},
];
headers() {
return [
{
source: '/(.*)',
headers: securityHeaders,
},
];
},

eslint: {
ignoreDuringBuilds: true,
},
typescript: {
ignoreBuildErrors: true,
}
eslint: {
ignoreDuringBuilds: true,
},
typescript: {
ignoreBuildErrors: true,
},
};


const ContentSecurityPolicy = `
default-src 'self';
script-src 'self' 'unsafe-eval' 'unsafe-inline';
Expand Down

0 comments on commit 1802985

Please sign in to comment.