Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a6ef5d5174 | ||
|
|
b263f97705 | ||
|
|
7e5cd0f40e | ||
|
|
32a68b0e59 | ||
|
|
dc4b07a70c | ||
|
|
5ca045fa4a | ||
|
|
f25668f1f7 | ||
|
|
dbdc116054 | ||
|
|
17ebbcc5aa | ||
|
|
6f995a10c8 | ||
|
|
e84d7b81f0 | - |
@@ -1,10 +1,13 @@
|
||||
FROM node:20-alpine AS builder
|
||||
ARG NODE_ENV=production
|
||||
ENV NODE_ENV=development
|
||||
WORKDIR /app
|
||||
COPY package.json package-lock.json* ./
|
||||
COPY packages/shared/package.json ./packages/shared/
|
||||
RUN npm install
|
||||
COPY packages/shared/ ./packages/shared/
|
||||
COPY . .
|
||||
ENV NODE_ENV=production
|
||||
RUN npx next build
|
||||
|
||||
FROM node:20-alpine AS runner
|
||||
@@ -13,7 +16,7 @@ RUN apk add --no-cache dumb-init
|
||||
RUN addgroup --system --gid 1001 nodejs && adduser --system --uid 1001 nextjs
|
||||
COPY --from=builder /app/.next/standalone ./
|
||||
COPY --from=builder /app/.next/static ./.next/static
|
||||
ENV NODE_ENV=production HOSTNAME=0.0.0.0
|
||||
ENV NODE_ENV=production HOSTNAME=0.0.0.0 PORT=3003
|
||||
EXPOSE 3003
|
||||
USER nextjs
|
||||
ENTRYPOINT ["dumb-init", "--"]
|
||||
|
||||
7
next.config.mjs
Normal file
7
next.config.mjs
Normal file
@@ -0,0 +1,7 @@
|
||||
/** @type {import('next').NextConfig} */
|
||||
const nextConfig = {
|
||||
transpilePackages: ['@fiberops/shared'],
|
||||
output: 'standalone',
|
||||
};
|
||||
|
||||
export default nextConfig;
|
||||
@@ -1,8 +0,0 @@
|
||||
import type { NextConfig } from 'next';
|
||||
|
||||
const nextConfig: NextConfig = {
|
||||
reactStrictMode: true,
|
||||
output: 'standalone',
|
||||
};
|
||||
|
||||
export default nextConfig;
|
||||
@@ -2,8 +2,8 @@
|
||||
"name": "@fiberops/shared",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"main": "./src/index.ts",
|
||||
"types": "./src/index.ts",
|
||||
"main": "./dist/index.js",
|
||||
"types": "./dist/index.d.ts",
|
||||
"scripts": {
|
||||
"build": "tsc",
|
||||
"lint": "tsc --noEmit",
|
||||
|
||||
@@ -1,15 +1,14 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "ES2022",
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "bundler",
|
||||
"module": "CommonJS",
|
||||
"moduleResolution": "node",
|
||||
"lib": ["ES2022"],
|
||||
"strict": true,
|
||||
"esModuleInterop": true,
|
||||
"skipLibCheck": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"resolveJsonModule": true,
|
||||
"isolatedModules": true,
|
||||
"declaration": true,
|
||||
"sourceMap": true,
|
||||
"outDir": "./dist",
|
||||
|
||||
10
src/app/not-found.tsx
Normal file
10
src/app/not-found.tsx
Normal file
@@ -0,0 +1,10 @@
|
||||
export default function NotFound() {
|
||||
return (
|
||||
<html lang="en">
|
||||
<body>
|
||||
<h1>404 - Page Not Found</h1>
|
||||
<p>The page you are looking for does not exist.</p>
|
||||
</body>
|
||||
</html>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user