fix: dockerfile stuff

This commit is contained in:
2025-06-30 12:21:58 +00:00
parent 87961cd18f
commit a1d849092b
2 changed files with 6 additions and 1 deletions

View File

@@ -34,6 +34,9 @@ WORKDIR /app
RUN apk add --no-cache ffmpeg
ARG commit=0
ENV commit=$commit
# Don't run production as root
RUN addgroup --system --gid 1001 nodejs
RUN adduser --system --uid 1001 nextjs

View File

@@ -1,6 +1,7 @@
import * as path from 'node:path';
import { fileURLToPath } from 'url';
import { readFileSync } from 'node:fs';
import { execSync } from 'node:child_process';
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
@@ -12,7 +13,8 @@ const LIVE_SERVER_URL =
const packageJson = JSON.parse(readFileSync('./package.json', 'utf8'));
const { version } = packageJson;
const commit = process.env.commit || process.env.NEXT_PUBLIC_COMMIT || 'unknown';
const commit = process.env.commit || execSync('git rev-parse --short HEAD')
.toString().trim();
/** @type {import('next').NextConfig} */
const nextConfig = {
images: {